From 19fd6c16a2d8d4ce883e5b43885fd14d5f886666 Mon Sep 17 00:00:00 2001 From: Rich Trott Date: Sat, 16 May 2015 19:33:13 -0700 Subject: [PATCH] doc: add notes to child_process.fork() and .exec() Adds notes about the difference to their POSIX counterparts. PR-URL: https://github.com/nodejs/io.js/pull/1718 Fixes: https://github.com/nodejs/io.js/issues/224 Reviewed-By: Roman Reiss --- doc/api/child_process.markdown | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/doc/api/child_process.markdown b/doc/api/child_process.markdown index 81faed0b0..329d04b13 100644 --- a/doc/api/child_process.markdown +++ b/doc/api/child_process.markdown @@ -586,6 +586,8 @@ if it runs longer than `timeout` milliseconds. The child process is killed with amount of data (in bytes) allowed on stdout or stderr - if this value is exceeded then the child process is killed. +*Note: Unlike the `exec()` POSIX system call, `child_process.exec()` does not replace +the existing process and uses a shell to execute the command.* ### child_process.execFile(file[, args][, options][, callback]) @@ -645,6 +647,9 @@ done with care and by default will talk over the fd represented an environmental variable `NODE_CHANNEL_FD` on the child process. The input and output on this fd is expected to be line delimited JSON objects. +*Note: Unlike the `fork()` POSIX system call, `child_process.fork()` does not clone the +current process.* + ## Synchronous Process Creation These methods are **synchronous**, meaning they **WILL** block the event loop,