std/io/process¶
module io.process
Child processes: a Command names a program and its arguments, and
starts nothing until an operation of io uses it. source and tap
start it and read its standard output, target and sink start it and
write its standard input, and run starts it, waits for it and gives a
Result. No shell reads the command line: no word is split and no *
is expanded. hql starts each child in a process group of its own, and
a child that is terminated takes every process it started with it.
Which programs a run may start is the commands grant of a project's
.hql/config.toml; a document starts none. A program imports the
module, from io.process import *.
Signal— A signal, by its POSIX name without theSIGprefix:TERM,KILL.Command— A program to run, with its arguments.Output— What a child that exited with status0wrote.CommandFailure— Why a command did not succeed.command— The command that runsprogramwithargs.run— Starts the command, writesinputto its standard input, waits for it to end, and gives what it wrote:ok(Output)when it exits0, anderr(CommandFailure)with the reason otherwise.