diff options
author | Sam Roberts <sam@strongloop.com> | 2013-10-10 22:28:01 -0700 |
---|---|---|
committer | Trevor Norris <trev.norris@gmail.com> | 2013-12-02 10:41:37 -0800 |
commit | 8aac118b69a10a134e57e8e066c56ba7370d25cc (patch) | |
tree | e15798b61427bf1ab3b39224be958cfab7243894 /doc/api | |
parent | 9b8fcff43575592ace3d391ee47184f98ed755df (diff) | |
download | node-8aac118b69a10a134e57e8e066c56ba7370d25cc.tar.gz |
process: document kill(0), disallow kill(O_RDWR)
The null signal test existed, but only tested the case where the target
process existed, not when it did not exist.
Also clarified that SIGUSR1 is reserved by Node.js only for receiveing,
its not at all reserved when sending a signal with kill().
kill(pid, 'O_RDWR'), or any other node constant, "worked". I fixed this
by also checking for 'SIG'. The same as done in the isSignal() function.
Now the signal names supported by process.kill() are the same as those
supported by process.on().
Diffstat (limited to 'doc/api')
-rw-r--r-- | doc/api/process.markdown | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/doc/api/process.markdown b/doc/api/process.markdown index d36af6b5a..0514f5e2e 100644 --- a/doc/api/process.markdown +++ b/doc/api/process.markdown @@ -421,6 +421,9 @@ string describing the signal to send. Signal names are strings like 'SIGINT' or 'SIGHUP'. If omitted, the signal will be 'SIGTERM'. See kill(2) for more information. +Will throw an error if target does not exist, and as a special case, a signal of +`0` can be used to test for the existence of a process. + Note that just because the name of this function is `process.kill`, it is really just a signal sender, like the `kill` system call. The signal sent may do something other than kill the target process. @@ -438,8 +441,8 @@ Example of sending a signal to yourself: process.kill(process.pid, 'SIGHUP'); -Note: SIGUSR1 is reserved by node.js. It can be used to kickstart the -debugger. +Note: When SIGUSR1 is received by Node.js it starts the debugger, see +[Signal Events](#process_signal_events). ## process.pid |