Skip to main content

send

method Process.send
Jump to headingProcess.send(
message: any,
sendHandle?: any,
options?: { keepOpen?: boolean | undefined; },
callback?: (error: Error | null) => void,
): boolean

If Node.js is spawned with an IPC channel, the process.send() method can be used to send messages to the parent process. Messages will be received as a 'message' event on the parent's ChildProcess object.

If Node.js was not spawned with an IPC channel, process.send will be undefined.

The message goes through serialization and parsing. The resulting message might not be the same as what is originally sent.

Parameters Jump to heading

Jump to headingmessage: any
optional
Jump to headingsendHandle: any
optional
Jump to headingoptions: { keepOpen?: boolean | undefined; }

used to parameterize the sending of certain types of handles. options supports the following properties:

optional
Jump to headingcallback: (error: Error | null) => void

Return Type Jump to heading

boolean
Back to top