You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
then the process will close only after the timeout.
I swear it wasn't like this before. It was working with just process.on('message'). Did something with Node.js change with newer versions?
Anyway how can I wait for a message from the parent process before closing? One would think process.on('message') would keep the process open until the listener was removed -or- process.exit() is called, etc.
LOL I know what's going on...I changed from 'fork' to 'spawn' and an IPC channel is not there by default.
I would recommend to the Node.js authors - please throw / log an error if process.on('message') is registered for a node.js process that does not have an IPC channel ?
process is an EventEmitter, so it could be used in weird and funky ways to pass a 'message' event around. It would be unwise to throw when listening for a specific event on an EventEmitter when you don't know how users make use of them.
Activity
ORESoftware commentedon Jun 22, 2017
LOL I know what's going on...I changed from 'fork' to 'spawn' and an IPC channel is not there by default.
I would recommend to the Node.js authors - please
throw/logan error ifprocess.on('message')is registered for a node.js process that does not have an IPC channel ?GlenTiki commentedon Jun 25, 2017
processis anEventEmitter, so it could be used in weird and funky ways to pass a 'message' event around. It would be unwise to throw when listening for a specific event on an EventEmitter when you don't know how users make use of them.refack commentedon Jun 25, 2017
I smell a deprecation of
messagein favor of anIPCMessagecoming soon... 👃ORESoftware commentedon Jun 26, 2017
@refack thanks for the 🗣 heads up :)