ChildProcess Class
Constructor
Item Index
Properties
Attributes
Methods
kill
-
signal
Sends a signal to the child process. Refer to Node.js child.kill documentation. Note that while the method is called kill, the signal delivered to the child process may not actually kill it. kill really just sends a signal to a process.
Parameters:
-
signal
String(optional) Defaults to 'SIGTERM'.
write
-
data
-
encoding
Writes data to the stdin of the child process. If the stdin of the child process has reported its kernel buffer is full, the write will be queued until the drain event.
Properties
_childProcess
Unknown
protected
_stderr
Unknown
protected
_stdin
Unknown
protected
_stdout
Unknown
protected
Attributes
args
Array
Array of command line arguments. Refer to Node.js child_process.spawn documentation.
Default: []
Fires event argsChange
Fires when the value for the configuration attribute args
is
changed. You can listen for the event using the on
method if you
wish to be notified before the attribute's value has changed, or
using the after
method if you wish to be notified after the
attribute's value has changed.
Parameters:
-
e
EventFacadeAn Event Facade object with the following attribute-specific properties added:
command
String
The command to execute. Refer to Node.js child_process.spawn documentation.
Fires event commandChange
Fires when the value for the configuration attribute command
is
changed. You can listen for the event using the on
method if you
wish to be notified before the attribute's value has changed, or
using the after
method if you wish to be notified after the
attribute's value has changed.
Parameters:
-
e
EventFacadeAn Event Facade object with the following attribute-specific properties added:
options
Object
Additional options. Refer to Node.js child_process.spawn documentation.
Default: {}
Fires event optionsChange
Fires when the value for the configuration attribute options
is
changed. You can listen for the event using the on
method if you
wish to be notified before the attribute's value has changed, or
using the after
method if you wish to be notified after the
attribute's value has changed.
Parameters:
-
e
EventFacadeAn Event Facade object with the following attribute-specific properties added:
pid
Number
The PID of the child process.
Fires event pidChange
Fires when the value for the configuration attribute pid
is
changed. You can listen for the event using the on
method if you
wish to be notified before the attribute's value has changed, or
using the after
method if you wish to be notified after the
attribute's value has changed.
Parameters:
-
e
EventFacadeAn Event Facade object with the following attribute-specific properties added:
ready
Boolean
This will be true when the stdin of the child process is writable and its kernel buffer is not full.
Default: false
Fires event readyChange
Fires when the value for the configuration attribute ready
is
changed. You can listen for the event using the on
method if you
wish to be notified before the attribute's value has changed, or
using the after
method if you wish to be notified after the
attribute's value has changed.
Parameters:
-
e
EventFacadeAn Event Facade object with the following attribute-specific properties added:
stderrEncoding
String
Encoding may be one of 'ascii', 'base64', or 'utf8'. If left undefined, the stderr event will emit a Buffer instead of a string.
Fires event stderrEncodingChange
Fires when the value for the configuration attribute stderrEncoding
is
changed. You can listen for the event using the on
method if you
wish to be notified before the attribute's value has changed, or
using the after
method if you wish to be notified after the
attribute's value has changed.
Parameters:
-
e
EventFacadeAn Event Facade object with the following attribute-specific properties added:
stdoutEncoding
String
Encoding may be one of 'ascii', 'base64', or 'utf8'. If left undefined, the stdout event will emit a Buffer instead of a string.
Fires event stdoutEncodingChange
Fires when the value for the configuration attribute stdoutEncoding
is
changed. You can listen for the event using the on
method if you
wish to be notified before the attribute's value has changed, or
using the after
method if you wish to be notified after the
attribute's value has changed.
Parameters:
-
e
EventFacadeAn Event Facade object with the following attribute-specific properties added:
Events
drain
Fires when the stdin of the child process is writable again after having reported its kernel buffer was full.
error
Fires when there is an error in any stream of the child process.
exit
Fires when the child process exits.