Closed
Description
I am on Node.js version 6-8
I have a child process file with this in it:
process.on('message', function(){
});
this process seems to shut down as soon as I start it.
Now if I add a setTimeout to it:
process.on('message', function(){
});
setTimeout(function(){
console.log('timed out');
},3000);
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.
Metadata
Metadata
Assignees
Labels
No labels