Skip to content

Commit 405bf8c

Browse files
TrottBridgeAR
authored andcommitted
doc,child_process: use code markup/markdown in headers
PR-URL: #31086 Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Ruben Bridgewater <[email protected]>
1 parent 0e0d45b commit 405bf8c

File tree

1 file changed

+28
-28
lines changed

1 file changed

+28
-28
lines changed

doc/api/child_process.md

+28-28
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ exec('"my script.cmd" a b', (err, stdout, stderr) => {
129129
});
130130
```
131131

132-
### child_process.exec(command\[, options\]\[, callback\])
132+
### `child_process.exec(command[, options][, callback])`
133133
<!-- YAML
134134
added: v0.1.90
135135
changes:
@@ -233,7 +233,7 @@ async function lsExample() {
233233
lsExample();
234234
```
235235

236-
### child_process.execFile(file\[, args\]\[, options\]\[, callback\])
236+
### `child_process.execFile(file[, args][, options][, callback])`
237237
<!-- YAML
238238
added: v0.1.91
239239
changes:
@@ -317,7 +317,7 @@ getVersion();
317317
function. Any input containing shell metacharacters may be used to trigger
318318
arbitrary command execution.**
319319

320-
### child_process.fork(modulePath\[, args\]\[, options\])
320+
### `child_process.fork(modulePath[, args][, options])`
321321
<!-- YAML
322322
added: v0.5.0
323323
changes:
@@ -388,7 +388,7 @@ current process.
388388
The `shell` option available in [`child_process.spawn()`][] is not supported by
389389
`child_process.fork()` and will be ignored if set.
390390

391-
### child_process.spawn(command\[, args\]\[, options\])
391+
### `child_process.spawn(command[, args][, options])`
392392
<!-- YAML
393393
added: v0.1.90
394394
changes:
@@ -535,7 +535,7 @@ Node.js currently overwrites `argv[0]` with `process.execPath` on startup, so
535535
parameter passed to `spawn` from the parent, retrieve it with the
536536
`process.argv0` property instead.
537537

538-
#### options.detached
538+
#### `options.detached`
539539
<!-- YAML
540540
added: v0.7.10
541541
-->
@@ -593,7 +593,7 @@ const subprocess = spawn('prg', [], {
593593
subprocess.unref();
594594
```
595595

596-
#### options.stdio
596+
#### `options.stdio`
597597
<!-- YAML
598598
added: v0.7.10
599599
changes:
@@ -698,7 +698,7 @@ Blocking calls like these are mostly useful for simplifying general-purpose
698698
scripting tasks and for simplifying the loading/processing of application
699699
configuration at startup.
700700

701-
### child_process.execFileSync(file\[, args\]\[, options\])
701+
### `child_process.execFileSync(file[, args][, options])`
702702
<!-- YAML
703703
added: v0.11.12
704704
changes:
@@ -765,7 +765,7 @@ If the process times out or has a non-zero exit code, this method will throw an
765765
function. Any input containing shell metacharacters may be used to trigger
766766
arbitrary command execution.**
767767

768-
### child_process.execSync(command\[, options\])
768+
### `child_process.execSync(command[, options])`
769769
<!-- YAML
770770
added: v0.11.12
771771
changes:
@@ -825,7 +825,7 @@ The [`Error`][] object will contain the entire result from
825825
**Never pass unsanitized user input to this function. Any input containing shell
826826
metacharacters may be used to trigger arbitrary command execution.**
827827

828-
### child_process.spawnSync(command\[, args\]\[, options\])
828+
### `child_process.spawnSync(command[, args][, options])`
829829
<!-- YAML
830830
added: v0.11.12
831831
changes:
@@ -902,7 +902,7 @@ exited.
902902
function. Any input containing shell metacharacters may be used to trigger
903903
arbitrary command execution.**
904904

905-
## Class: ChildProcess
905+
## Class: `ChildProcess`
906906
<!-- YAML
907907
added: v2.2.0
908908
-->
@@ -916,7 +916,7 @@ use the [`child_process.spawn()`][], [`child_process.exec()`][],
916916
[`child_process.execFile()`][], or [`child_process.fork()`][] methods to create
917917
instances of `ChildProcess`.
918918

919-
### Event: 'close'
919+
### Event: `'close'`
920920
<!-- YAML
921921
added: v0.7.7
922922
-->
@@ -945,7 +945,7 @@ ls.on('exit', (code) => {
945945
});
946946
```
947947

948-
### Event: 'disconnect'
948+
### Event: `'disconnect'`
949949
<!-- YAML
950950
added: v0.7.2
951951
-->
@@ -956,7 +956,7 @@ The `'disconnect'` event is emitted after calling the
956956
possible to send or receive messages, and the [`subprocess.connected`][]
957957
property is `false`.
958958

959-
### Event: 'error'
959+
### Event: `'error'`
960960

961961
* `err` {Error} The error.
962962

@@ -972,7 +972,7 @@ against accidentally invoking handler functions multiple times.
972972

973973
See also [`subprocess.kill()`][] and [`subprocess.send()`][].
974974

975-
### Event: 'exit'
975+
### Event: `'exit'`
976976
<!-- YAML
977977
added: v0.1.90
978978
-->
@@ -995,7 +995,7 @@ re-raise the handled signal.
995995

996996
See waitpid(2).
997997

998-
### Event: 'message'
998+
### Event: `'message'`
999999
<!-- YAML
10001000
added: v0.5.9
10011001
-->
@@ -1015,7 +1015,7 @@ child process, the `message` argument can contain data that JSON is not able
10151015
to represent.
10161016
See [Advanced Serialization][] for more details.
10171017

1018-
### subprocess.channel
1018+
### `subprocess.channel`
10191019
<!-- YAML
10201020
added: v7.1.0
10211021
-->
@@ -1025,7 +1025,7 @@ added: v7.1.0
10251025
The `subprocess.channel` property is a reference to the child's IPC channel. If
10261026
no IPC channel currently exists, this property is `undefined`.
10271027

1028-
### subprocess.connected
1028+
### `subprocess.connected`
10291029
<!-- YAML
10301030
added: v0.7.2
10311031
-->
@@ -1036,7 +1036,7 @@ The `subprocess.connected` property indicates whether it is still possible to
10361036
send and receive messages from a child process. When `subprocess.connected` is
10371037
`false`, it is no longer possible to send or receive messages.
10381038

1039-
### subprocess.disconnect()
1039+
### `subprocess.disconnect()`
10401040
<!-- YAML
10411041
added: v0.7.2
10421042
-->
@@ -1055,7 +1055,7 @@ When the child process is a Node.js instance (e.g. spawned using
10551055
[`child_process.fork()`][]), the `process.disconnect()` method can be invoked
10561056
within the child process to close the IPC channel as well.
10571057

1058-
### subprocess.kill(\[signal\])
1058+
### `subprocess.kill([signal])`
10591059
<!-- YAML
10601060
added: v0.1.90
10611061
-->
@@ -1117,7 +1117,7 @@ setTimeout(() => {
11171117
}, 2000);
11181118
```
11191119

1120-
### subprocess.killed
1120+
### `subprocess.killed`
11211121
<!-- YAML
11221122
added: v0.5.10
11231123
-->
@@ -1129,7 +1129,7 @@ The `subprocess.killed` property indicates whether the child process
11291129
successfully received a signal from `subprocess.kill()`. The `killed` property
11301130
does not indicate that the child process has been terminated.
11311131

1132-
### subprocess.pid
1132+
### `subprocess.pid`
11331133
<!-- YAML
11341134
added: v0.1.90
11351135
-->
@@ -1146,7 +1146,7 @@ console.log(`Spawned child pid: ${grep.pid}`);
11461146
grep.stdin.end();
11471147
```
11481148

1149-
### subprocess.ref()
1149+
### `subprocess.ref()`
11501150
<!-- YAML
11511151
added: v0.7.10
11521152
-->
@@ -1167,7 +1167,7 @@ subprocess.unref();
11671167
subprocess.ref();
11681168
```
11691169

1170-
### subprocess.send(message\[, sendHandle\[, options\]\]\[, callback\])
1170+
### `subprocess.send(message[, sendHandle[, options]][, callback])`
11711171
<!-- YAML
11721172
added: v0.5.9
11731173
changes:
@@ -1348,7 +1348,7 @@ It is also recommended that any `'message'` handlers in the child process
13481348
verify that `socket` exists, as the connection may have been closed during the
13491349
time it takes to send the connection to the child.
13501350

1351-
### subprocess.stderr
1351+
### `subprocess.stderr`
13521352
<!-- YAML
13531353
added: v0.1.90
13541354
-->
@@ -1363,7 +1363,7 @@ then this will be `null`.
13631363
`subprocess.stderr` is an alias for `subprocess.stdio[2]`. Both properties will
13641364
refer to the same value.
13651365

1366-
### subprocess.stdin
1366+
### `subprocess.stdin`
13671367
<!-- YAML
13681368
added: v0.1.90
13691369
-->
@@ -1381,7 +1381,7 @@ then this will be `null`.
13811381
`subprocess.stdin` is an alias for `subprocess.stdio[0]`. Both properties will
13821382
refer to the same value.
13831383

1384-
### subprocess.stdio
1384+
### `subprocess.stdio`
13851385
<!-- YAML
13861386
added: v0.7.10
13871387
-->
@@ -1421,7 +1421,7 @@ assert.strictEqual(subprocess.stdio[2], null);
14211421
assert.strictEqual(subprocess.stdio[2], subprocess.stderr);
14221422
```
14231423

1424-
### subprocess.stdout
1424+
### `subprocess.stdout`
14251425
<!-- YAML
14261426
added: v0.1.90
14271427
-->
@@ -1446,7 +1446,7 @@ subprocess.stdout.on('data', (data) => {
14461446
});
14471447
```
14481448

1449-
### subprocess.unref()
1449+
### `subprocess.unref()`
14501450
<!-- YAML
14511451
added: v0.7.10
14521452
-->

0 commit comments

Comments
 (0)