Hi guys,
This is my server.js:
[code]
var spawn = require("child_process").spawn;
var myapp = spawn('java', ['-jar', 'myapplication.jar']);
myapp.stdout.on('data', function (data) {
console.log('stdout: ' + data);
});
myapp.stderr.on('data', function (data) {
console.log('stderr: ' + data);
});
myapp.on('exit', function (code) {
console.log('child process exited with code ' + code);
});
[/code]
P.S.:just put here the relevant lines.
My problem is: if I kill the nodejs process, my application (child
process) dies too. I figure out that this is the normal behaviour, but
there is a way to keep my child process running independently if the
parent process is running or not?
Thank you very much!!
--
Job Board: http://jobs.nodejs.org/
Posting guidelines:
https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
You received this message because you are subscribed to the Google
Groups "nodejs" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en