joyent/node — Issue #2292: child_process.fork() - parent process signals are relayed to child process
Author: skenqbx
Created: 2011-12-08 11:02:34+00:00
State: open

node.js v0.6.5

Given the following code, i receive a SIGINT in the child process when i CTRL-C the parent process.

` test.js` :

```javascript
var fork = require('child_process').fork;

process.on('SIGINT', function() {
console.log(process.pid + ' SIGINT');
process.exit(0);
});

if(!process.env.CHILD_PROCESS) {
fork(process.argv[1], [], { env: {
'CHILD_PROCESS': 1
}});
}
```
$ node test.js
^C24726 SIGINT
24724 SIGINT

Is this a recent change?
Is this on purpose?
The documentation is somewhat unclear on that issue, and as far as i understood it this should not happen.

Any comment on that is very much appreciated.