Skip to content

Commit d56fc6a

Browse files
TrottMylesBorins
authored andcommitted
doc,child_process: use code markup/markdown in headers
Backport-PR-URL: #31108 PR-URL: #31086 Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Ruben Bridgewater <[email protected]>
1 parent c470e6e commit d56fc6a

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:
@@ -382,7 +382,7 @@ current process.
382382
The `shell` option available in [`child_process.spawn()`][] is not supported by
383383
`child_process.fork()` and will be ignored if set.
384384

385-
### child_process.spawn(command\[, args\]\[, options\])
385+
### `child_process.spawn(command[, args][, options])`
386386
<!-- YAML
387387
added: v0.1.90
388388
changes:
@@ -523,7 +523,7 @@ Node.js currently overwrites `argv[0]` with `process.execPath` on startup, so
523523
parameter passed to `spawn` from the parent, retrieve it with the
524524
`process.argv0` property instead.
525525

526-
#### options.detached
526+
#### `options.detached`
527527
<!-- YAML
528528
added: v0.7.10
529529
-->
@@ -581,7 +581,7 @@ const subprocess = spawn('prg', [], {
581581
subprocess.unref();
582582
```
583583

584-
#### options.stdio
584+
#### `options.stdio`
585585
<!-- YAML
586586
added: v0.7.10
587587
changes:
@@ -686,7 +686,7 @@ Blocking calls like these are mostly useful for simplifying general-purpose
686686
scripting tasks and for simplifying the loading/processing of application
687687
configuration at startup.
688688

689-
### child_process.execFileSync(file\[, args\]\[, options\])
689+
### `child_process.execFileSync(file[, args][, options])`
690690
<!-- YAML
691691
added: v0.11.12
692692
changes:
@@ -753,7 +753,7 @@ If the process times out or has a non-zero exit code, this method will throw an
753753
function. Any input containing shell metacharacters may be used to trigger
754754
arbitrary command execution.**
755755

756-
### child_process.execSync(command\[, options\])
756+
### `child_process.execSync(command[, options])`
757757
<!-- YAML
758758
added: v0.11.12
759759
changes:
@@ -813,7 +813,7 @@ The [`Error`][] object will contain the entire result from
813813
**Never pass unsanitized user input to this function. Any input containing shell
814814
metacharacters may be used to trigger arbitrary command execution.**
815815

816-
### child_process.spawnSync(command\[, args\]\[, options\])
816+
### `child_process.spawnSync(command[, args][, options])`
817817
<!-- YAML
818818
added: v0.11.12
819819
changes:
@@ -890,7 +890,7 @@ exited.
890890
function. Any input containing shell metacharacters may be used to trigger
891891
arbitrary command execution.**
892892

893-
## Class: ChildProcess
893+
## Class: `ChildProcess`
894894
<!-- YAML
895895
added: v2.2.0
896896
-->
@@ -904,7 +904,7 @@ use the [`child_process.spawn()`][], [`child_process.exec()`][],
904904
[`child_process.execFile()`][], or [`child_process.fork()`][] methods to create
905905
instances of `ChildProcess`.
906906

907-
### Event: 'close'
907+
### Event: `'close'`
908908
<!-- YAML
909909
added: v0.7.7
910910
-->
@@ -933,7 +933,7 @@ ls.on('exit', (code) => {
933933
});
934934
```
935935

936-
### Event: 'disconnect'
936+
### Event: `'disconnect'`
937937
<!-- YAML
938938
added: v0.7.2
939939
-->
@@ -944,7 +944,7 @@ The `'disconnect'` event is emitted after calling the
944944
possible to send or receive messages, and the [`subprocess.connected`][]
945945
property is `false`.
946946

947-
### Event: 'error'
947+
### Event: `'error'`
948948

949949
* `err` {Error} The error.
950950

@@ -960,7 +960,7 @@ against accidentally invoking handler functions multiple times.
960960

961961
See also [`subprocess.kill()`][] and [`subprocess.send()`][].
962962

963-
### Event: 'exit'
963+
### Event: `'exit'`
964964
<!-- YAML
965965
added: v0.1.90
966966
-->
@@ -983,7 +983,7 @@ re-raise the handled signal.
983983

984984
See waitpid(2).
985985

986-
### Event: 'message'
986+
### Event: `'message'`
987987
<!-- YAML
988988
added: v0.5.9
989989
-->
@@ -998,7 +998,7 @@ The `'message'` event is triggered when a child process uses
998998
The message goes through serialization and parsing. The resulting
999999
message might not be the same as what is originally sent.
10001000

1001-
### subprocess.channel
1001+
### `subprocess.channel`
10021002
<!-- YAML
10031003
added: v7.1.0
10041004
-->
@@ -1008,7 +1008,7 @@ added: v7.1.0
10081008
The `subprocess.channel` property is a reference to the child's IPC channel. If
10091009
no IPC channel currently exists, this property is `undefined`.
10101010

1011-
### subprocess.connected
1011+
### `subprocess.connected`
10121012
<!-- YAML
10131013
added: v0.7.2
10141014
-->
@@ -1019,7 +1019,7 @@ The `subprocess.connected` property indicates whether it is still possible to
10191019
send and receive messages from a child process. When `subprocess.connected` is
10201020
`false`, it is no longer possible to send or receive messages.
10211021

1022-
### subprocess.disconnect()
1022+
### `subprocess.disconnect()`
10231023
<!-- YAML
10241024
added: v0.7.2
10251025
-->
@@ -1038,7 +1038,7 @@ When the child process is a Node.js instance (e.g. spawned using
10381038
[`child_process.fork()`][]), the `process.disconnect()` method can be invoked
10391039
within the child process to close the IPC channel as well.
10401040

1041-
### subprocess.kill(\[signal\])
1041+
### `subprocess.kill([signal])`
10421042
<!-- YAML
10431043
added: v0.1.90
10441044
-->
@@ -1100,7 +1100,7 @@ setTimeout(() => {
11001100
}, 2000);
11011101
```
11021102

1103-
### subprocess.killed
1103+
### `subprocess.killed`
11041104
<!-- YAML
11051105
added: v0.5.10
11061106
-->
@@ -1112,7 +1112,7 @@ The `subprocess.killed` property indicates whether the child process
11121112
successfully received a signal from `subprocess.kill()`. The `killed` property
11131113
does not indicate that the child process has been terminated.
11141114

1115-
### subprocess.pid
1115+
### `subprocess.pid`
11161116
<!-- YAML
11171117
added: v0.1.90
11181118
-->
@@ -1129,7 +1129,7 @@ console.log(`Spawned child pid: ${grep.pid}`);
11291129
grep.stdin.end();
11301130
```
11311131

1132-
### subprocess.ref()
1132+
### `subprocess.ref()`
11331133
<!-- YAML
11341134
added: v0.7.10
11351135
-->
@@ -1150,7 +1150,7 @@ subprocess.unref();
11501150
subprocess.ref();
11511151
```
11521152

1153-
### subprocess.send(message\[, sendHandle\[, options\]\]\[, callback\])
1153+
### `subprocess.send(message[, sendHandle[, options]][, callback])`
11541154
<!-- YAML
11551155
added: v0.5.9
11561156
changes:
@@ -1331,7 +1331,7 @@ It is also recommended that any `'message'` handlers in the child process
13311331
verify that `socket` exists, as the connection may have been closed during the
13321332
time it takes to send the connection to the child.
13331333

1334-
### subprocess.stderr
1334+
### `subprocess.stderr`
13351335
<!-- YAML
13361336
added: v0.1.90
13371337
-->
@@ -1346,7 +1346,7 @@ then this will be `null`.
13461346
`subprocess.stderr` is an alias for `subprocess.stdio[2]`. Both properties will
13471347
refer to the same value.
13481348

1349-
### subprocess.stdin
1349+
### `subprocess.stdin`
13501350
<!-- YAML
13511351
added: v0.1.90
13521352
-->
@@ -1364,7 +1364,7 @@ then this will be `null`.
13641364
`subprocess.stdin` is an alias for `subprocess.stdio[0]`. Both properties will
13651365
refer to the same value.
13661366

1367-
### subprocess.stdio
1367+
### `subprocess.stdio`
13681368
<!-- YAML
13691369
added: v0.7.10
13701370
-->
@@ -1404,7 +1404,7 @@ assert.strictEqual(subprocess.stdio[2], null);
14041404
assert.strictEqual(subprocess.stdio[2], subprocess.stderr);
14051405
```
14061406

1407-
### subprocess.stdout
1407+
### `subprocess.stdout`
14081408
<!-- YAML
14091409
added: v0.1.90
14101410
-->
@@ -1429,7 +1429,7 @@ subprocess.stdout.on('data', (data) => {
14291429
});
14301430
```
14311431

1432-
### subprocess.unref()
1432+
### `subprocess.unref()`
14331433
<!-- YAML
14341434
added: v0.7.10
14351435
-->

0 commit comments

Comments
 (0)