Class pinnacle.process.Child
​
The result of spawning a command.
Fields ​
pid ​
pid
: integer
The pid of the spawned command.
stdin nullable ​
stdin?
: pinnacle.process.ChildStdin
This process's standard input, if any.
This will only exist if pipe_stdin
was set on the Command
before spawning.
stdout nullable ​
stdout?
: pinnacle.process.ChildStdout
This process's standard output, if any.
This will only exist if pipe_stdout
was set on the Command
before spawning.
stderr nullable ​
stderr?
: pinnacle.process.ChildStderr
This process's standard error, if any.
This will only exist if pipe_stderr
was set on the Command
before spawning.
Functions ​
method wait ​
function pinnacle.process.Child:wait()
-> { exit_code?: integer, exit_msg?: string }
Waits for this child process to exit.
This will block the calling thread.
Returns ​
{ exit_code?: integer, exit_msg?: string }
- The exit status of the process.
method on_line_stdout ​
function pinnacle.process.Child:on_line_stdout(on_line: fun(line: string))
-> self: self
Runs a function with every line of the child process's standard output.
Parameters ​
on_line
: fun(line: string)
Returns ​
self
:self
- This child for chaining
method on_line_stderr ​
function pinnacle.process.Child:on_line_stderr(on_line: fun(line: string))
-> self: self
Runs a function with every line of the child process's standard error.
Parameters ​
on_line
: fun(line: string)
Returns ​
self
:self
- This child for chaining