@@ -12,10 +12,9 @@ data you send to the child process may not be immediately consumed.)
1212
1313To create a child process use ` require('child_process').spawn() ` or
1414` require('child_process').fork() ` . The semantics of each are slightly
15- different, and explained [ below] ( #child_process_asynchronous_process_creation ) .
15+ different, and explained [ below] [ ] .
1616
17- For scripting purposes you may find the
18- [ synchronous counterparts] ( #child_process_synchronous_process_creation ) more
17+ For scripting purposes you may find the [ synchronous counterparts] [ ] more
1918convenient.
2019
2120## Class: ChildProcess
@@ -61,8 +60,7 @@ Note that the `exit`-event may or may not fire after an error has occurred. If
6160you are listening on both events to fire a function, remember to guard against
6261calling your function twice.
6362
64- See also [ ` ChildProcess#kill() ` ] ( #child_process_child_kill_signal ) and
65- [ ` ChildProcess#send() ` ] ( #child_process_child_send_message_sendhandle_callback ) .
63+ See also [ ` ChildProcess#kill() ` ] [ ] and [ ` ChildProcess#send() ` ] [ ] .
6664
6765### Event: 'exit'
6866
@@ -161,7 +159,7 @@ Example:
161159* ` callback ` {Function}
162160* Return: Boolean
163161
164- When using [ ` child_process.fork() ` ] ( #child_process_child_process_fork_modulepath_args_options ) you can write to the child using
162+ When using [ ` child_process.fork() ` ] [ ] you can write to the child using
165163` child.send(message[, sendHandle][, callback]) ` and messages are received by
166164a ` 'message' ` event on the child.
167165
@@ -309,9 +307,7 @@ to the same object, or null.
309307* {Array}
310308
311309A sparse array of pipes to the child process, corresponding with positions in
312- the [ stdio] ( #child_process_options_stdio ) option to
313- [ spawn] ( #child_process_child_process_spawn_command_args_options ) that have been
314- set to ` 'pipe' ` .
310+ the [ stdio] [ ] option to [ spawn] [ ] that have been set to ` 'pipe' ` .
315311Note that streams 0-2 are also available as ChildProcess.stdin,
316312ChildProcess.stdout, and ChildProcess.stderr, respectively.
317313
@@ -438,9 +434,9 @@ the existing process and uses a shell to execute the command.*
438434 * ` stderr ` {Buffer}
439435* Return: ChildProcess object
440436
441- This is similar to [ ` child_process.exec() ` ] ( #child_process_child_process_exec_command_options_callback ) except it does not execute a
437+ This is similar to [ ` child_process.exec() ` ] [ ] except it does not execute a
442438subshell but rather the specified file directly. This makes it slightly
443- leaner than [ ` child_process.exec() ` ] ( #child_process_child_process_exec_command_options_callback ) . It has the same options.
439+ leaner than [ ` child_process.exec() ` ] [ ] . It has the same options.
444440
445441
446442### child_process.fork(modulePath[ , args] [ , options ] )
@@ -461,10 +457,10 @@ leaner than [`child_process.exec()`](#child_process_child_process_exec_command_o
461457 * ` gid ` {Number} Sets the group identity of the process. (See setgid(2).)
462458* Return: ChildProcess object
463459
464- This is a special case of the [ ` child_process.spawn() ` ] ( #child_process_child_process_spawn_command_args_options ) functionality for spawning Node.js
465- processes. In addition to having all the methods in a normal ChildProcess
466- instance, the returned object has a communication channel built-in. See
467- [ ` child.send(message, [sendHandle]) ` ] ( #child_process_child_send_message_sendhandle_callback ) for details.
460+ This is a special case of the [ ` child_process.spawn() ` ] [ ] functionality for
461+ spawning Node.js processes. In addition to having all the methods in a normal
462+ ChildProcess instance, the returned object has a communication channel built-in.
463+ See [ ` child.send(message, [sendHandle]) ` ] [ ] for details.
468464
469465These child Node.js processes are still whole new instances of V8. Assume at
470466least 30ms startup and 10mb memory for each new Node.js. That is, you cannot
@@ -662,7 +658,7 @@ Example:
662658 // startd-style interface.
663659 spawn('prg', [], { stdio: ['pipe', null, null, null, 'pipe'] });
664660
665- 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 )
661+ See also: [ ` child_process.exec() ` ] [ ] and [ ` child_process.fork() ` ] [ ]
666662
667663## Synchronous Process Creation
668664
@@ -702,11 +698,7 @@ process has exited.
702698
703699If the process times out, or has a non-zero exit code, this method *** will***
704700throw. The ` Error ` object will contain the entire result from
705- [ ` child_process.spawnSync() ` ] ( #child_process_child_process_spawnsync_command_args_options )
706-
707- [ EventEmitter ] : events.html#events_class_events_eventemitter
708- [ net.Server ] : net.html#net_class_net_server
709- [ net.Socket ] : net.html#net_class_net_socket
701+ [ ` child_process.spawnSync() ` ] [ ]
710702
711703### child_process.execSync(command[ , options] )
712704
@@ -740,7 +732,7 @@ process has exited.
740732
741733If the process times out, or has a non-zero exit code, this method *** will***
742734throw. The ` Error ` object will contain the entire result from
743- [ ` child_process.spawnSync() ` ] ( #child_process_child_process_spawnsync_command_args_options )
735+ [ ` child_process.spawnSync() ` ] [ ]
744736
745737### child_process.spawnSync(command[ , args] [ , options ] )
746738
@@ -773,3 +765,18 @@ timeout has been encountered and `killSignal` is sent, the method won't return
773765until the process has completely exited. That is to say, if the process handles
774766the ` SIGTERM ` signal and doesn't exit, your process will wait until the child
775767process has exited.
768+
769+ [ below ] : #child_process_asynchronous_process_creation
770+ [ synchronous counterparts ] : #child_process_synchronous_process_creation
771+ [ EventEmitter ] : events.html#events_class_events_eventemitter
772+ [ `ChildProcess#kill()` ] : #child_process_child_kill_signal
773+ [ `ChildProcess#send()` ] : #child_process_child_send_message_sendhandle_callback
774+ [ net.Server ] : net.html#net_class_net_server
775+ [ net.Socket ] : net.html#net_class_net_socket
776+ [ `child_process.fork()` ] : #child_process_child_process_fork_modulepath_args_options
777+ [ stdio ] : #child_process_options_stdio
778+ [ spawn ] : #child_process_child_process_spawn_command_args_options
779+ [ `child_process.exec()` ] : #child_process_child_process_exec_command_options_callback
780+ [ `child_process.spawn()` ] : #child_process_child_process_spawn_command_args_options
781+ [ ` child.send(message, [sendHandle]) ` ] : #child_process_child_send_message_sendhandle_callback
782+ [ `child_process.spawnSync()` ] : #child_process_child_process_spawnsync_command_args_options
0 commit comments