childprocess.stdin

child.stdin <Stream> A Writable Stream that represents the child process's stdin. Note that if a child process waits to read all of its input, the child will not continue until this stream has been closed via end(). If the child was spawned with stdio[0] set to anything other than 'pipe', then this will be undefined. child.stdin is an alias for child.stdio[0]. Both properties will refer to the same value.

childprocess.stderr

child.stderr <Stream> A Readable Stream that represents the child process's stderr. If the child was spawned with stdio[2] set to anything other than 'pipe', then this will be undefined. child.stderr is an alias for child.stdio[2]. Both properties will refer to the same value.

childprocess.send()

child.send(message[, sendHandle[, options]][, callback]) message <Object> sendHandle <Handle> options <Object> callback <Function> Return: <Boolean> When an IPC channel has been established between the parent and child ( i.e. when using child_process.fork()), the child.send() method can be used to send messages to the child process. When the child process is a Node.js instance, these messages can be received via the process.on('message') event. For exam

childprocess.pid

child.pid <Number> Integer Returns the process identifier (PID) of the child process. Example: const spawn = require('child_process').spawn; const grep = spawn('grep', ['ssh']); console.log(`Spawned child pid: ${grep.pid}`); grep.stdin.end();

childprocess.kill()

child.kill([signal]) signal <String> The child.kill() methods sends a signal to the child process. If no argument is given, the process will be sent the 'SIGTERM' signal. See signal(7) for a list of available signals. const spawn = require('child_process').spawn; const grep = spawn('grep', ['ssh']); grep.on('close', (code, signal) => { console.log( `child process terminated due to receipt of signal ${signal}`); }); // Send SIGHUP to process grep.kill('SIGHUP'); The ChildPr

childprocess.disconnect()

child.disconnect() Closes the IPC channel between parent and child, allowing the child to exit gracefully once there are no other connections keeping it alive. After calling this method the child.connected and process.connected properties in both the parent and child (respectively) will be set to false, and it will be no longer possible to pass messages between the processes. The 'disconnect' event will be emitted when there are no messages in the process of being received. This will most ofte

childprocess.connected

child.connected <Boolean> Set to false after .disconnect is called The child.connected property indicates whether it is still possible to send and receive messages from a child process. When child.connected is false, it is no longer possible to send or receive messages.

ChildProcess

Class: ChildProcess Instances of the ChildProcess class are EventEmitters that represent spawned child processes. Instances of ChildProcess are not intended to be created directly. Rather, use the child_process.spawn(), child_process.exec(), child_process.execFile(), or child_process.fork() methods to create instances of ChildProcess.

checkExpectation event (http.ClientRequest)

Event: 'checkExpectation' function (request, response) { } Emitted each time a request with an http Expect header is received, where the value is not 100-continue. If this event isn't listened for, the server will automatically respond with a 417 Expectation Failed as appropriate. Note that when this event is emitted and handled, the request event will not be emitted.

checkContinue event (http.Server)

Event: 'checkContinue' function (request, response) { } Emitted each time a request with an http Expect: 100-continue is received. If this event isn't listened for, the server will automatically respond with a 100 Continue as appropriate. Handling this event involves calling response.writeContinue() if the client should continue to send the request body, or generating an appropriate HTTP response (e.g., 400 Bad Request) if the client should not continue to send the request body. Note that wh