api
process.ch
Declarations in process.ch
1 declarationsprocess
Declarations
Public only
process#
Publicnamespace
namespace process
process — cross-platform process management.
ProcessOutput#
Publicstruct
make#
functionConstructor
func make() : ProcessOutput
delete#
function
func delete(self : *ProcessOutput) : void
ExitStatus#
Publicstruct
struct ExitStatus {
var code : int
var signaled : bool
var signal : int
}
ProcessResult#
Publicstruct
stdout_str#
Publicfunction
/ Get stdout as a string view (assumes UTF-8).
stderr_str#
Publicfunction
/ Get stderr as a string view (assumes UTF-8).
is_success#
Publicfunction
func is_success(self : &ProcessResult) : bool
/ Check whether the process exited successfully.
delete#
function
func delete(self : *ProcessResult) : void
ProcessConfig#
Publicstruct
struct ProcessConfig {
var args : vector<string>
var env : vector<string>
var working_dir : string
var capture_stdout : bool
var capture_stderr : bool
var merge_stdout_stderr : bool
var stdin_data : vector<u8>
var timeout_ms : int
}
default#
Publicfunction
func default() : ProcessConfig
delete#
function
func delete(self : *ProcessConfig) : void
ChildProcess#
Publicstruct
struct ChildProcess {
var _unix :
var is_running : bool
var captured_stdout : vector<u8>
var captured_stderr : vector<u8>
}
delete#
function
func delete(self : *ChildProcess) : void
PR_Result#
Publictypealias
CP_Result#
Publictypealias
UT_Result#
Publictypealias
pr_ok#
function
pr_err#
function
execute#
Publicfunction
spawn#
Publicfunction
wait#
Publicfunction
kill_process#
Publicfunction
is_running#
Publicfunction
func is_running(child : *ChildProcess) : bool
---------------------------------------------------------------------------
write_stdin#
Publicfunction
/ Write data to the child process's stdin pipe.
close_stdin#
Publicfunction
/ Close the stdin pipe of a child process (sends EOF to the child).
try_wait#
Publicfunction
/ Reap the child process and return its exit status without blocking.
current_pid#
Publicfunction
func current_pid() : int
---------------------------------------------------------------------------
child_pid#
Publicfunction
func child_pid(child : *ChildProcess) : int
/ Get the PID of a child process.