Skip to content

Commit 86dd244

Browse files
Trottsilverwind
authored andcommitted
doc: add notes to child_process.fork() and .exec()
Adds notes about the difference to their POSIX counterparts. PR-URL: #1718 Fixes: #224 Reviewed-By: Roman Reiss <[email protected]>
1 parent 5773438 commit 86dd244

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

doc/api/child_process.markdown

+5
Original file line numberDiff line numberDiff line change
@@ -586,6 +586,8 @@ if it runs longer than `timeout` milliseconds. The child process is killed with
586586
amount of data (in bytes) allowed on stdout or stderr - if this value is
587587
exceeded then the child process is killed.
588588

589+
*Note: Unlike the `exec()` POSIX system call, `child_process.exec()` does not replace
590+
the existing process and uses a shell to execute the command.*
589591

590592
### child_process.execFile(file[, args][, options][, callback])
591593

@@ -645,6 +647,9 @@ done with care and by default will talk over the fd represented an
645647
environmental variable `NODE_CHANNEL_FD` on the child process. The input and
646648
output on this fd is expected to be line delimited JSON objects.
647649

650+
*Note: Unlike the `fork()` POSIX system call, `child_process.fork()` does not clone the
651+
current process.*
652+
648653
## Synchronous Process Creation
649654

650655
These methods are **synchronous**, meaning they **WILL** block the event loop,

0 commit comments

Comments
 (0)