process: throw TypeError if kill pid not a number
authorSam Roberts <sam@strongloop.com>
Wed, 23 Jul 2014 21:22:22 +0000 (14:22 -0700)
committerFedor Indutny <fedor@indutny.com>
Mon, 28 Jul 2014 14:30:26 +0000 (18:30 +0400)
commit832ec1cd507ed344badd2ed97d3da92975650a95
tree5e89adade63db2faa4a62ba2a59a85c8af05b0fe
parent9a63a1d89b5a2a015eadd5ef5d7e42039858c5ae
process: throw TypeError if kill pid not a number

Currently, invalid usage such as:

    process.kill('SIGTERM')
    process.kill(null)
    process.kill(undefined);

all coerce the pid to 0, and signal the current process.

Signed-off-by: Fedor Indutny <fedor@indutny.com>
src/node.js
test/simple/test-process-kill-pid.js [new file with mode: 0644]