Result returned by spawnAndLog after running a child process. It is compatible with handler results. To support both HandlerResult and SpawnPromiseReturns, the value of code and status are identical.
Default ErrorFinder that regards everything but a return code of 0 as failure.
process exit status
true if exit status is not zero
Clear provided timers, checking to make sure the timers are defined before clearing them.
the timers to clear.
Kill the process and wait for it to shut down. This can take a
while as processes may have shut down hooks. On win32, the process
is killed and the Promise is rejected if the process does not exit
within wait
milliseconds. On other platforms, first the process
is sent the default signal, SIGTERM. After wait
milliseconds, it
is sent SIGKILL. After another wait
milliseconds, an error is
thrown.
Child process to kill
Number of milliseconds to wait before sending SIGKILL and then erroring, default is 30000 ms
Spawn a process, logging its standard output and standard error,
and return a Promise of its results. The command is spawned using
cross-spawn. A DelimitedWriteProgressLogDecorator, using newlines
as delimiters, is created from the provided opts.log
. The default
command timeout is 10 minutes. The default
[[SpawnLogOptions#errorFinder]] sets the error
property if the
command exits with a non-zero status or is killed by a signal. If
the process is killed due to a signal or the errorFinder
returns
true
, the returned code
property will be non-zero.
Command to run.
Arguments to command.
Options for spawn, spawnPromise, and spawnLog.
A promise that provides information on the child process and
its execution result, including if the exit status was non-zero
or the process was killed by a signal. The promise is only
rejected with an ExecPromiseError
if there is an error
spawning the process.
Generated using TypeDoc
Type that can react to the exit of a spawned child process, after Node has terminated without reporting an error. This is necessary only for commands that can return a zero exit status on failure or non-zero exit code on success. Implementations should return
true
if an error is found,false
otherwise.