You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
close event only emmited upon voluntary exit of program #94
Fires when the process has been terminated, with an error or not.
But it does not fire in all cases. It only fires if the exit code is not null.
this.childProcess.on('exit',function(code){self.exitCode=code;terminateIfNeeded();});functionterminateIfNeeded(){if(!self.stderrHasEnded||!self.stdoutHasEnded||self.exitCode==null){return;}// ... code goes on to emit close}
The 'exit' event is emitted after the child process ends. If the process exited, code is the final exit code of the process, otherwise null. If the process terminated due to receipt of a signal, signal is the string name of the signal, otherwise null. One of the two will always be non-null.
If the process is closed due to a signal the exit code will be null, and therefore the close event will not fire. Either the close documentation should be updated, the logic should be changed, or a new event should be added in for termination via signal.
Activity
Added ability to send kill signal to terminate and address extrabacon#94