SysProcReadFromStderr

Table of Contents

SysProcReadFromStderr

Description

Perform a blocking read from stderr of child process to provided buffer.

Parameters

NameDirectionDescription
procinChild process handle to read from.
bufoutPointer to Str object where the read data will be appended.

Success

Return number of bytes read.

Failure

Return -1

Usage example (Cross-references)

    }
    
    i32 SysProcReadFromStderr(SysProc *proc, Str *buf) {
    return sys_proc_read_internal(proc, buf, /* is stdout*/ false);
    }
    do {                                                                                                               \
    Str b_ = StrInit();                                                                                            \
    SysProcReadFromStderr((p), &b_);                                                                               \
    const char *in_ = b_.data;                                                                                     \
    StrReadFmt(in_, __VA_ARGS__);                                                                                  \

Share :