From 404ec88a57152d10763be595fd39a5073336ae9e Mon Sep 17 00:00:00 2001 From: Kyle Smith Date: Wed, 7 Oct 2015 16:03:21 -0700 Subject: [PATCH] doc: clarify the use of `option.detached` This paragraph conveys that detached child processes do not stay running in the background in general. Instead clarify that this refers to the parent process exiting before the detached child process is complete. Reviewed-By: Trevor Norris Reviewed-By: Colin Ihrig Reviewed-By: James M Snell PR-URL: https://github.com/nodejs/node/pull/3250 --- doc/api/child_process.markdown | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/doc/api/child_process.markdown b/doc/api/child_process.markdown index ebbc8f4df2c6c9..bddf90ff85b625 100644 --- a/doc/api/child_process.markdown +++ b/doc/api/child_process.markdown @@ -535,9 +535,10 @@ file: child.unref(); When using the `detached` option to start a long-running process, the process -will not stay running in the background unless it is provided with a `stdio` -configuration that is not connected to the parent. If the parent's `stdio` is -inherited, the child will remain attached to the controlling terminal. +will not stay running in the background after the parent exits unless it is +provided with a `stdio` configuration that is not connected to the parent. +If the parent's `stdio` is inherited, the child will remain attached to the +controlling terminal. See also: [`child_process.exec()`](#child_process_child_process_exec_command_options_callback) and [`child_process.fork()`](#child_process_child_process_fork_modulepath_args_options)