Import with #import "std/process_channel_linux".
ProcessChannel :: struct { socket: Socket.LinuxSocket; pid: s32; code: s32; exited: bool; error: s32; }StartChannel :: (arguments: []string, merge_stderr: bool, discard_stderr: bool) -> ProcessChannelChannelSend :: (channel: ProcessChannel, input: []u8, timeout_ms: s32) -> s64CloseChannelInput :: (channel: ProcessChannel) -> boolEnd this child's input without closing its output. The caller may continue ChannelReceive and must still WaitChannel/CloseChannel. A second half-close is harmless while the channel remains open. Further sends safely fail.
ChannelReceive :: (channel: ProcessChannel, output: []u8, timeout_ms: s32) -> s64WaitChannel :: (channel: *ProcessChannel, timeout_ms: s32) -> boolCloseChannel :: (channel: *ProcessChannel, timeout_ms: s32) -> boolCancelChannel :: (channel: *ProcessChannel) -> boolCancellation keeps the unreaped PID as proof of process-group ownership. Signal the group before WaitChannel can reap an already-exited parent whose descendant still owns stdout. Already joined channels only close their fd.