Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nodejs/node.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorBen Noordhuis <info@bnoordhuis.nl>2011-08-05 06:29:16 +0400
committerBen Noordhuis <info@bnoordhuis.nl>2011-08-05 06:29:16 +0400
commit30d20cf40595e5d0c31b6d3cab9afc9fe8c54bfb (patch)
tree0c351601246b58f08c7f04c2c0ce1d1d3b5f7aeb /doc
parent2fe4558c1074538dc419067e22108edafc6f083a (diff)
Revert commits 12c8b27 and 88f416a, fixed properly in 2fe4558.
Diffstat (limited to 'doc')
-rw-r--r--doc/api/child_processes.markdown21
1 files changed, 2 insertions, 19 deletions
diff --git a/doc/api/child_processes.markdown b/doc/api/child_processes.markdown
index dca4bdc3d07..a8cc8780eec 100644
--- a/doc/api/child_processes.markdown
+++ b/doc/api/child_processes.markdown
@@ -234,24 +234,7 @@ be sent `'SIGTERM'`. See `signal(7)` for a list of available signals.
// send SIGHUP to process
grep.kill('SIGHUP');
-Note that while the function is called `kill`, the signal delivered to the
-child process may not actually kill it. `kill` really just sends a signal
-to a process.
-
-Please note that the example contains a potential race condition on
-(at least) UNIX systems. Here is why:
-
-The canonical approach to starting a child process is to call `fork()` to
-create a copy of the current process, followed by a call to `execve()` to
-replace the copy with the actual child process. This runs in tandem with
-the parent process.
-
-The time between `fork()` and `execve()` is short but it's not zero.
-The child process may not have actually started when `spawn()` returns.
-Thus, if you send a signal immediately after the call to `spawn()`, it may
-end up being delivered to the copy of the current process and *not* the
-actual child process.
-
-The resulting behavior is undefined. It likely won't do what you want it to.
+Note that while the function is called `kill`, the signal delivered to the child
+process may not actually kill it. `kill` really just sends a signal to a process.
See `kill(2)`