From 8e37cb385d229f4497971c7f33e66ceb9c749116 Mon Sep 17 00:00:00 2001 From: Rich Trott Date: Sat, 16 May 2015 19:33:13 -0700 Subject: [PATCH 1/3] child_process: note in docs that fork() and exec() are unrelated to Unix system calls of the same name --- doc/api/child_process.markdown | 3 +++ 1 file changed, 3 insertions(+) diff --git a/doc/api/child_process.markdown b/doc/api/child_process.markdown index 19b2b9016fd5e0..af64e3141c5ecb 100644 --- a/doc/api/child_process.markdown +++ b/doc/api/child_process.markdown @@ -586,6 +586,7 @@ 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. +`child_process.exec()` is unrelated to the `exec()` system call in Unix-like operating systems. ### child_process.execFile(file[, args][, options][, callback]) @@ -645,6 +646,8 @@ 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. +`child_process.fork()` is unrelated to the `fork()` system call in Unix-like operating systems. + ## Synchronous Process Creation These methods are **synchronous**, meaning they **WILL** block the event loop, From 861329749bfedf62c637f4f10c0a1cf408e2306f Mon Sep 17 00:00:00 2001 From: Rich Trott Date: Sun, 17 May 2015 20:29:20 -0700 Subject: [PATCH 2/3] tweaks based on feedback --- doc/api/child_process.markdown | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/doc/api/child_process.markdown b/doc/api/child_process.markdown index af64e3141c5ecb..96316c1f0c2e04 100644 --- a/doc/api/child_process.markdown +++ b/doc/api/child_process.markdown @@ -586,7 +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. -`child_process.exec()` is unrelated to the `exec()` system call in Unix-like operating systems. +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]) @@ -646,7 +647,8 @@ 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. -`child_process.fork()` is unrelated to the `fork()` system call in Unix-like operating systems. +Unlike the `fork()` POSIX system call, `child_process.fork()` does not clone the +current process. ## Synchronous Process Creation From 16af9bd373398afe9db1469dc779a1124fc7d0d5 Mon Sep 17 00:00:00 2001 From: Rich Trott Date: Tue, 19 May 2015 15:48:09 -0700 Subject: [PATCH 3/3] italicize meta-info and set of with Note: --- doc/api/child_process.markdown | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/doc/api/child_process.markdown b/doc/api/child_process.markdown index 96316c1f0c2e04..1082bf050066d0 100644 --- a/doc/api/child_process.markdown +++ b/doc/api/child_process.markdown @@ -586,8 +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. -Unlike the `exec()` POSIX system call, `child_process.exec()` does not replace -the existing process and uses a shell to execute the command. +*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]) @@ -647,8 +647,8 @@ 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. -Unlike the `fork()` POSIX system call, `child_process.fork()` does not clone the -current process. +*Note: Unlike the `fork()` POSIX system call, `child_process.fork()` does not clone the +current process.* ## Synchronous Process Creation