Skip to content
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

naught stop not working. #76

Open
cyrusbowman opened this issue Apr 28, 2015 · 2 comments
Open

naught stop not working. #76

cyrusbowman opened this issue Apr 28, 2015 · 2 comments

Comments

@cyrusbowman
Copy link

naught start example.js
naught stop

Child process fails to receive process.on('message', ...) in node v0.11.11 and greater.

if (process.send) {
    process.send('online');
    console.log("sent online");
}

process.on('message', function(m, server) {
    //********** This never gets called in node v0.11.11 or greater. **********
    console.log('Message' + m);
    process.exit();
});

var number = 0;
function printMessage() {
    number = number + 1;
    console.log("Message " + number);
    setTimeout(printMessage, 1000);
}
printMessage();
@AvnerCohen
Copy link
Contributor

The setTimeout seems to effect the behavior of the master.
Removing the printMessage() block makes this work as expected.

Interesting behaviour, though, I am wondering if this is a real need or this part of the code was just meant for debugging the issue?

@bruce-one
Copy link
Contributor

I think this issue was fixed with 1.5.1 :-)

(Just based on doing some manual trying)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants