process.stdout

process.stdout

process.stdout

Function

Read the status object of the started child process's stdout pipe.

Syntax

Parameters

No parameters.

Return value

TypeDescription
ObjectReturns the stdout pipe status object.
EmptyThe child process has not been started, or the child process does not have a stdout pipe.

Status object fields

FieldTypeDescription
kindStringFixed to stdout.
availableIntThe number of bytes currently buffered and not yet taken out by stdout_read.
closedBoolstdout Whether the pipe has been closed.
overflowBoolWhether the unread buffer has exceeded BT_PROCESS_PIPE_LIMIT or pipe_limit(bytes).
total_readIntThe cumulative number of bytes read by the background reading thread from stdout.
limitIntThe upper limit of the current stdout pipe's unread buffer.
read_chunkIntSingle read chunk size.
timeout_msIntScript reading wait timeout.

Example

Notes

  • stdout() only returns the pipeline status and does not consume buffered data.
  • child() opens stdout/stderr pipes by default; child processes started by inherit_stdio() or null_stdio() have no readable stdout pipes.
  • The default BT_PROCESS_PIPE_LIMIT is 1048576 bytes, BT_PROCESS_PIPE_READ_CHUNK is 8192 bytes, and BT_PROCESS_PIPE_TIMEOUT_MS is 100 milliseconds; a single Process can use pipe_limit(bytes) to override the unread buffer limit.