I'm spawning a child process using Node 6.9 inside of a Docker container. Docker version 17.05.0-ce-rc1-mac8
container.
const child = require('child_process').execFile('command', args);
child.stdout.on('data', (data) => {
console.log('child:', data);
});
child.stderr.on('data', (data) => {
console.log('child:', data);
});
child.on('close', (code, signal) => {
console.log(`ERROR: child terminated. Exit code: ${code}, signal: ${signal}`);
});
My child process runs for 1-2 minutes but then I get this output from my Node.js program:
ERROR: child terminated. Exit code: null, signal: SIGTERM
What terminates my child process and why? I don't have this problem when running the child process standalone.
via mitchkman
No comments:
Post a Comment