SysProcWriteToStdin
- Function
- October 8, 2025
Table of Contents
SysProcWriteToStdin
SysProcWriteToStdin
Description
Write given raw data to stdin
of child process.
Parameters
Name | Direction | Description |
---|---|---|
proc | in | Child process handle to write to. |
buf | in | Pointer to Str object containing data to be written. |
Success
Return number of bytes written.
Failure
Return -1
Usage example (Cross-references)
- In
Proc.c:407
:
}
i32 SysProcWriteToStdin(SysProc *proc, Str *buf) {
if (!proc || !buf) {
LOG_FATAL("Invalid arguments");
- In
Proc.h:185
:
Str b_ = StrInit(); \
StrWriteFmt(&b_, __VA_ARGS__); \
SysProcWriteToStdin((p), &b_); \
StrDeinit(&b_); \
} while (0)
- In
Proc.h:194
:
StrWriteFmt(&b_, __VA_ARGS__); \
StrPushBack(&b_, '\n'); \
SysProcWriteToStdin((p), &b_); \
StrDeinit(&b_); \
} while (0)