I really hate to seperate the command and arguments when using
spawn, and I hate to spawn things on Windows, so I made
Spawns could run a list of commands on both widnows and linux.
Spawns supports to execute commands with the similar API of
npm install spawns --save
spawns(...) returns a
Array of command strings. Notice that the command here is not a
"ls ['-al']" way, but like
options is the same argument as
Numberthe exit code, if it exited normally.
Stringthe signal passed to kill the child process, if it was killed by the parent.
This event is emitted when the stdio streams of all child processes have all terminated, or if there are any error encountered. This is distinct from 'exit', since multiple processes might share the same stdio streams.
Error Objectthe error.
Note that the exit-event may or may not fire after an error has occured. If you are listening on both events to fire a function, remember to guard against calling your function twice.