Awesome fix, thanks :D Only one detail, I think we need to keep the "child.removeListener('stdout', startupListener);" on this line (23) otherwise it will open a new window if ungit crashes and restarts internally