How can I determine the termination of process properly?
See org.eclipse.debug.core.DebugPlugin.getLaunchManager(). You can
register an ILaunchListener or ILaunchesListener2 there and then get
notified with launchChanged(..) or launchesTerminated(..).