process.stderr_read_lines

process.stderr_read_lines

process.stderr_read_lines

Function

Read the currently available text of the started subprocess stderr line by line.

Syntax

Parameters

No parameters.

Return value

TypeDescription
ArrayReturns the array of stderr lines read this time.
EmptyThe child process has not been started, there is no stderr pipe, there is no new data within the timeout, or the pipe has been closed and the remaining data has been read.

Example

Notes

  • stderr_read_lines() splits lines based on the text read this time and does not wait for additional data to complete the lines.
  • A single read is still limited by BT_PROCESS_PIPE_READ_CHUNK, and large output requires repeated reads.
  • 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.
  • BT_PROCESS_PIPE_LIMIT limits the current unread buffer and does not limit the historical cumulative output; as long as reading continues, the long-term error stream can exceed 1MB of total output.