stdio

Pstdio
Bun

Symbol

SpawnOptions.OptionsObject.stdio

stdio?: [In, Out, Err]

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 will have no standard input (default)
  • "pipe": The process will have a new FileSink for standard input
  • "inherit": The process will inherit the standard input of the current process
  • ArrayBufferView, Blob, Bun.file(), Response, Request: The process will read from buffer/stream.
  • number: The process will read from the file descriptor

For stdout and stdin you may pass:

  • "pipe", undefined: The process will have a ReadableStream for standard output/error
  • "ignore", null: The process will have no standard output/error
  • "inherit": The process will inherit the standard output/error of the current process
  • ArrayBufferView: The process write to the preallocated buffer. Not implemented.
  • number: The process will write to the file descriptor