@@ -660,6 +660,9 @@ subprocess.unref();
660660<!-- YAML
661661added: v0.7.10
662662changes:
663+ - version: REPLACEME
664+ pr-url: https://github.com/nodejs/node/pull/29412
665+ description: Added the `overlapped` stdio flag.
663666 - version: v3.3.1
664667 pr-url: https://github.com/nodejs/node/pull/2727
665668 description: The value `0` is now accepted as a file descriptor.
@@ -675,6 +678,7 @@ equal to `['pipe', 'pipe', 'pipe']`.
675678For convenience, ` options.stdio ` may be one of the following strings:
676679
677680* ` 'pipe' ` : equivalent to ` ['pipe', 'pipe', 'pipe'] ` (the default)
681+ * ` 'overlapped' ` : equivalent to ` ['overlapped', 'overlapped', 'overlapped'] `
678682* ` 'ignore' ` : equivalent to ` ['ignore', 'ignore', 'ignore'] `
679683* ` 'inherit' ` : equivalent to ` ['inherit', 'inherit', 'inherit'] ` or ` [0, 1, 2] `
680684
@@ -688,7 +692,13 @@ pipes between the parent and child. The value is one of the following:
688692 ` child_process ` object as [ ` subprocess.stdio[fd] ` ] [ `subprocess.stdio` ] . Pipes
689693 created for fds 0, 1, and 2 are also available as [ ` subprocess.stdin ` ] [ ] ,
690694 [ ` 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
692702 between parent and child. A [ ` ChildProcess ` ] [ ] may have at most one IPC
693703 stdio file descriptor. Setting this option enables the
694704 [ ` 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:
699709 Accessing the IPC channel fd in any way other than [ ` process.send() ` ] [ ]
700710 or using the IPC channel with a child process that is not a Node.js instance
701711 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
703713 will always open fds 0, 1, and 2 for the processes it spawns, setting the fd
704714 to ` 'ignore' ` will cause Node.js to open ` /dev/null ` and attach it to the
705715 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
707717 parent process. In the first three positions, this is equivalent to
708718 ` process.stdin ` , ` process.stdout ` , and ` process.stderr ` , respectively. In
709719 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,
711721 file, socket, or a pipe with the child process. The stream's underlying
712722 file descriptor is duplicated in the child process to the fd that
713723 corresponds to the index in the ` stdio ` array. The stream must have an
714724 underlying descriptor (file streams do not until the ` 'open' ` event has
715725 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
717727 that is currently open in the parent process. It is shared with the child
718728 process, similar to how {Stream} objects can be shared. Passing sockets
719729 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
721731 words, stdin, stdout, and stderr) a pipe is created. For fd 3 and up, the
722732 default is ` 'ignore' ` .
723733
0 commit comments