The current code does the following:
1) Launch the process
2) Then add the debugListener to o.e.debug
This is problematic. If the process ends very quickly,. our listener will never get alerted that the process terminated, and so the server will be stuck at 'starting'.
Solution is to add the debugListener BEFORE launching the process.