Types

Process

Running or finished process

Methods

.(p:Process, attr:Str)
Get process "stdout"
.(p:Process, attr:Str)
Get process "stderr"
.=(p:Process, attr:Str, v:Any)
Set process "stdout"
.=(p:Process, attr:Str, v:Any)
Set process "stderr"
assert_exit_code(p:Process, expected:Int, title:Any=null)
assert_output_has(p:Process, expected:Any, title:Any=null)
Bool(p:Process)
Wait for process to finish and see whether exit code is 0
finished_ok(p:Process)
Decide whether process finished normally: exit code must be 0.
finished_ok(p:Process)
Decide whether /bin/false process finished normally: exit code must be 1.
finished_ok(p:Process)
Decide whether specific process finished normally: exit code must be 0 or 1.
finished_ok(p:Process)
init(p:Process, c:Command)
Process constructor
inspect(p:Process)
Inspect Process
kill(p:Process, sig:Int=15)
Send signal to a Process. Uses KILL(2). Throws InvalidArgument if Process does not have "pid". Throws KillFail on error.
lines(p:Process)
Wait for the process and return lines of its stdout.
lines(p:Process, cb:Fun)
Iterate lines of Process' stdout, calling cb with successive lines. Warning: current implementation waits for the process to finish and accumulates all its stdout.
Str(p:Process)
Wait for the process to finish and return its standard output.
to_exit_code(p:Process)
Convert Process to exit code. Waites for the process to finish and uses its exit code.
wait(p:Process)
Wait for the process to finish. Waits for reading and writing threads to finish first.