-
Notifications
You must be signed in to change notification settings - Fork 285
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Wait for message from parent before closing #693
Comments
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 |
|
I smell a deprecation of |
@refack thanks for the 🗣 heads up :) |
I am on Node.js version 6-8
I have a child process file with this in it:
this process seems to shut down as soon as I start it.
Now if I add a setTimeout to it:
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.
The text was updated successfully, but these errors were encountered: