The fix will do what you expect. In case of signal of main process while sub process is still running it will throw an exception that main process is not active.
In addition, since 4.4 there will be API method exposing subprocess instance so you will not need to use internal classes to get hold of this information.