@@ -660,6 +660,9 @@ subprocess.unref();
660
660
<!-- YAML
661
661
added: v0.7.10
662
662
changes:
663
+ - version: REPLACEME
664
+ pr-url: https://github.com/nodejs/node/pull/29412
665
+ description: Added the `overlapped` stdio flag.
663
666
- version: v3.3.1
664
667
pr-url: https://github.com/nodejs/node/pull/2727
665
668
description: The value `0` is now accepted as a file descriptor.
@@ -675,6 +678,7 @@ equal to `['pipe', 'pipe', 'pipe']`.
675
678
For convenience, ` options.stdio ` may be one of the following strings:
676
679
677
680
* ` 'pipe' ` : equivalent to ` ['pipe', 'pipe', 'pipe'] ` (the default)
681
+ * ` 'overlapped' ` : equivalent to ` ['overlapped', 'overlapped', 'overlapped'] `
678
682
* ` 'ignore' ` : equivalent to ` ['ignore', 'ignore', 'ignore'] `
679
683
* ` 'inherit' ` : equivalent to ` ['inherit', 'inherit', 'inherit'] ` or ` [0, 1, 2] `
680
684
@@ -688,7 +692,13 @@ pipes between the parent and child. The value is one of the following:
688
692
` child_process ` object as [ ` subprocess.stdio[fd] ` ] [ `subprocess.stdio` ] . Pipes
689
693
created for fds 0, 1, and 2 are also available as [ ` subprocess.stdin ` ] [ ] ,
690
694
[ ` subprocess.stdout ` ] [ ] and [ ` subprocess.stderr ` ] [ ] , respectively.
691
- 2 . ` 'ipc' ` : Create an IPC channel for passing messages/file descriptors
695
+ 1 . ` 'overlapped' ` : Same as ` 'pipe' ` except that the ` FILE_FLAG_OVERLAPPED ` flag
696
+ is set on the handle. This is necessary for overlapped I/O on the child
697
+ process's stdio handles. See the
698
+ [ docs] ( https://docs.microsoft.com/en-us/windows/win32/fileio/synchronous-and-asynchronous-i-o )
699
+ for more details. This is exactly the same as ` 'pipe' ` on non-Windows
700
+ systems.
701
+ 1 . ` 'ipc' ` : Create an IPC channel for passing messages/file descriptors
692
702
between parent and child. A [ ` ChildProcess ` ] [ ] may have at most one IPC
693
703
stdio file descriptor. Setting this option enables the
694
704
[ ` subprocess.send() ` ] [ ] method. If the child is a Node.js process, the
@@ -699,25 +709,25 @@ pipes between the parent and child. The value is one of the following:
699
709
Accessing the IPC channel fd in any way other than [ ` process.send() ` ] [ ]
700
710
or using the IPC channel with a child process that is not a Node.js instance
701
711
is not supported.
702
- 3 . ` 'ignore' ` : Instructs Node.js to ignore the fd in the child. While Node.js
712
+ 1 . ` 'ignore' ` : Instructs Node.js to ignore the fd in the child. While Node.js
703
713
will always open fds 0, 1, and 2 for the processes it spawns, setting the fd
704
714
to ` 'ignore' ` will cause Node.js to open ` /dev/null ` and attach it to the
705
715
child's fd.
706
- 4 . ` 'inherit' ` : Pass through the corresponding stdio stream to/from the
716
+ 1 . ` 'inherit' ` : Pass through the corresponding stdio stream to/from the
707
717
parent process. In the first three positions, this is equivalent to
708
718
` process.stdin ` , ` process.stdout ` , and ` process.stderr ` , respectively. In
709
719
any other position, equivalent to ` 'ignore' ` .
710
- 5 . {Stream} object: Share a readable or writable stream that refers to a tty,
720
+ 1 . {Stream} object: Share a readable or writable stream that refers to a tty,
711
721
file, socket, or a pipe with the child process. The stream's underlying
712
722
file descriptor is duplicated in the child process to the fd that
713
723
corresponds to the index in the ` stdio ` array. The stream must have an
714
724
underlying descriptor (file streams do not until the ` 'open' ` event has
715
725
occurred).
716
- 6 . Positive integer: The integer value is interpreted as a file descriptor
726
+ 1 . Positive integer: The integer value is interpreted as a file descriptor
717
727
that is currently open in the parent process. It is shared with the child
718
728
process, similar to how {Stream} objects can be shared. Passing sockets
719
729
is not supported on Windows.
720
- 7 . ` null ` , ` undefined ` : Use default value. For stdio fds 0, 1, and 2 (in other
730
+ 1 . ` null ` , ` undefined ` : Use default value. For stdio fds 0, 1, and 2 (in other
721
731
words, stdin, stdout, and stderr) a pipe is created. For fd 3 and up, the
722
732
default is ` 'ignore' ` .
723
733
0 commit comments