Skip to content

Commit 605c5a7

Browse files
smith-kylervagg
authored andcommitted
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 <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: James M Snell <[email protected]> PR-URL: #3250
1 parent cf75a17 commit 605c5a7

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

doc/api/child_process.markdown

+4-3
Original file line numberDiff line numberDiff line change
@@ -535,9 +535,10 @@ file:
535535
child.unref();
536536

537537
When using the `detached` option to start a long-running process, the process
538-
will not stay running in the background unless it is provided with a `stdio`
539-
configuration that is not connected to the parent. If the parent's `stdio` is
540-
inherited, the child will remain attached to the controlling terminal.
538+
will not stay running in the background after the parent exits unless it is
539+
provided with a `stdio` configuration that is not connected to the parent.
540+
If the parent's `stdio` is inherited, the child will remain attached to the
541+
controlling terminal.
541542

542543
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)
543544

0 commit comments

Comments
 (0)