Skip to content
SysProcReadFromStdout

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)

Usage examples (Cross-references)
    }
    
    i32 SysProcReadFromStdout(SysProc *proc, Str *buf) {
        return sys_proc_read_internal(proc, buf, /* is stdout*/ true);
    }
        do {                                                                                                               \
            Str b_ = StrInit();                                                                                            \
            SysProcReadFromStdout((p), &b_);                                                                               \
            const char *in_ = b_.data;                                                                                     \
            StrReadFmt(in_, __VA_ARGS__);                                                                                  \
Last updated on