Dave
Dave

Reputation: 410

nodejs child process signal handling

I'v got a daemon child process (Linux) spawned from the server via child_process.spawn(...).

I can kill it with p.kill() command and the child process dies fine. However, when I send USR signals to the child process - let's say p.kill("SIGUSR1") - prior to killing it p.kill("SIGKILL") the child process gets the USR1 signal, but, surprisingly, the subsequent SIGKILL never gets to the child(!?). Also, exit event of the child process is not called as well.

Is there anything I miss about signal handling in node?

Cheers

Upvotes: 1

Views: 3738

Answers (1)

Dave
Dave

Reputation: 410

Have just found it :) It's a bug: https://github.com/joyent/node/issues/1035

Calling process.kill(pid,signal) works multiple times.

Cheers

Upvotes: 1

Related Questions