← all modules
module

stdlib::process

defined in C:\Users\bye45\.glide\bin/src/stdlib/process.glide

Result of a finished subprocess run.

struct struct ProcessResult

Result of a finished subprocess run.

struct struct Command

Builder for a subprocess command. Chain methods to configure, then call .run() to execute synchronously or .spawn() for non-blocking start.

struct struct ChildStdin

Handle to the child's stdin pipe (when Command::pipe_stdin() was used).

struct struct ChildStdout

Handle to the child's stdout pipe (when Command::pipe_stdout() was used).

struct struct ChildStderr

Handle to the child's stderr pipe (when Command::pipe_stderr() was used).

struct struct Child

Handle to a spawned (still-running) child process. The pipe handles are non-null only when the corresponding Command::pipe_* builder was called.

fn fn process_kill(pid: int, sig: int) -> !void

Send signal sig to PID. POSIX: kill(pid, sig). Windows: TerminateProcess (sig is ignored).

glide
let r: ! = process_kill(1234, 15);   // SIGTERM
if !r.ok { eprintln(r.err); }
fn fn process_exists(pid: int) -> bool

true if a process with this PID is alive. POSIX: kill(pid, 0). Windows: OpenProcess + GetExitCodeProcess(STILL_ACTIVE).

glide
if process_exists(1234) { println!("still running"); }