property
Spawn.SpawnOptions.stdio
stdio?: [In, Out, Err, ...Readable | 'socket-fd'[]]
The standard file descriptors of the process, in the form [stdin, stdout, stderr]. This overrides the stdin, stdout, and stderr properties.
For stdin you may pass:
"ignore",null,undefined: The process has no standard input (default)"pipe": The process has a new FileSink for standard input"inherit": The process inherits the standard input of the current processArrayBufferView,Blob,Bun.file(),Response,Request: The process reads from buffer/stream.number: The process reads from the file descriptor
For stdout and stderr you may pass:
"pipe",undefined: The process has a ReadableStream for standard output/error"ignore",null: The process has no standard output/error"inherit": The process inherits the standard output/error of the current processArrayBufferView: The process writes to the preallocated buffer. Not implemented.number: The process writes to the file descriptor
At indices >= 3, "socket-fd" (POSIX only) is also accepted: creates a socketpair like "pipe", but the parent-end fd exposed via Subprocess.stdio is owned by the caller and is never closed by the subprocess. Use this when you wrap the fd in something that will close it itself (e.g. net.connect({fd})). On Windows it behaves the same as "pipe".