@@ -599,21 +599,21 @@ equal to `['pipe', 'pipe', 'pipe']`.
599
599
600
600
For convenience, ` options.stdio ` may be one of the following strings:
601
601
602
- * ` 'pipe' ` - equivalent to ` ['pipe', 'pipe', 'pipe'] ` (the default)
603
- * ` 'ignore' ` - equivalent to ` ['ignore', 'ignore', 'ignore'] `
604
- * ` 'inherit' ` - equivalent to ` ['inherit', 'inherit', 'inherit'] ` or ` [0, 1, 2] `
602
+ * ` 'pipe' ` : equivalent to ` ['pipe', 'pipe', 'pipe'] ` (the default)
603
+ * ` 'ignore' ` : equivalent to ` ['ignore', 'ignore', 'ignore'] `
604
+ * ` 'inherit' ` : equivalent to ` ['inherit', 'inherit', 'inherit'] ` or ` [0, 1, 2] `
605
605
606
606
Otherwise, the value of ` options.stdio ` is an array where each index corresponds
607
607
to an fd in the child. The fds 0, 1, and 2 correspond to stdin, stdout,
608
608
and stderr, respectively. Additional fds can be specified to create additional
609
609
pipes between the parent and child. The value is one of the following:
610
610
611
- 1 . ` 'pipe' ` - Create a pipe between the child process and the parent process.
611
+ 1 . ` 'pipe' ` : Create a pipe between the child process and the parent process.
612
612
The parent end of the pipe is exposed to the parent as a property on the
613
613
` child_process ` object as [ ` subprocess.stdio[fd] ` ] [ `subprocess.stdio` ] . Pipes
614
- created for fds 0 - 2 are also available as [ ` subprocess.stdin ` ] [ ] ,
614
+ created for fds 0, 1, and 2 are also available as [ ` subprocess.stdin ` ] [ ] ,
615
615
[ ` subprocess.stdout ` ] [ ] and [ ` subprocess.stderr ` ] [ ] , respectively.
616
- 2 . ` 'ipc' ` - Create an IPC channel for passing messages/file descriptors
616
+ 2 . ` 'ipc' ` : Create an IPC channel for passing messages/file descriptors
617
617
between parent and child. A [ ` ChildProcess ` ] [ ] may have at most one IPC
618
618
stdio file descriptor. Setting this option enables the
619
619
[ ` subprocess.send() ` ] [ ] method. If the child is a Node.js process, the
@@ -624,25 +624,25 @@ pipes between the parent and child. The value is one of the following:
624
624
Accessing the IPC channel fd in any way other than [ ` process.send() ` ] [ ]
625
625
or using the IPC channel with a child process that is not a Node.js instance
626
626
is not supported.
627
- 3 . ` 'ignore' ` - Instructs Node.js to ignore the fd in the child. While Node.js
628
- will always open fds 0 - 2 for the processes it spawns, setting the fd to
629
- ` 'ignore' ` will cause Node.js to open ` /dev/null ` and attach it to the
627
+ 3 . ` 'ignore' ` : Instructs Node.js to ignore the fd in the child. While Node.js
628
+ will always open fds 0, 1, and 2 for the processes it spawns, setting the fd
629
+ to ` 'ignore' ` will cause Node.js to open ` /dev/null ` and attach it to the
630
630
child's fd.
631
- 4 . ` 'inherit' ` - Pass through the corresponding stdio stream to/from the
631
+ 4 . ` 'inherit' ` : Pass through the corresponding stdio stream to/from the
632
632
parent process. In the first three positions, this is equivalent to
633
633
` process.stdin ` , ` process.stdout ` , and ` process.stderr ` , respectively. In
634
634
any other position, equivalent to ` 'ignore' ` .
635
- 5 . {Stream} object - Share a readable or writable stream that refers to a tty,
635
+ 5 . {Stream} object: Share a readable or writable stream that refers to a tty,
636
636
file, socket, or a pipe with the child process. The stream's underlying
637
637
file descriptor is duplicated in the child process to the fd that
638
638
corresponds to the index in the ` stdio ` array. The stream must have an
639
639
underlying descriptor (file streams do not until the ` 'open' ` event has
640
640
occurred).
641
- 6 . Positive integer - The integer value is interpreted as a file descriptor
641
+ 6 . Positive integer: The integer value is interpreted as a file descriptor
642
642
that is currently open in the parent process. It is shared with the child
643
643
process, similar to how {Stream} objects can be shared. Passing sockets
644
644
is not supported on Windows.
645
- 7 . ` null ` , ` undefined ` - Use default value. For stdio fds 0, 1, and 2 (in other
645
+ 7 . ` null ` , ` undefined ` : Use default value. For stdio fds 0, 1, and 2 (in other
646
646
words, stdin, stdout, and stderr) a pipe is created. For fd 3 and up, the
647
647
default is ` 'ignore' ` .
648
648
0 commit comments