SysProcReadFromStdout
- Function
- October 8, 2025
Table of Contents
SysProcReadFromStdout
SysProcReadFromStdout
Description
Perform a blocking read from stdout
of child process to provided buffer.
Parameters
Name | Direction | Description |
---|---|---|
proc | in | Child process handle to read from. |
buf | out | Pointer to Str object where the read data will be appended. |
Success
Return number of bytes read.
Failure
Return -1
Usage example (Cross-references)
- In
Proc.c:506
:
}
i32 SysProcReadFromStdout(SysProc *proc, Str *buf) {
return sys_proc_read_internal(proc, buf, /* is stdout*/ true);
}
- In
Proc.h:166
:
do { \
Str b_ = StrInit(); \
SysProcReadFromStdout((p), &b_); \
const char *in_ = b_.data; \
StrReadFmt(in_, __VA_ARGS__); \