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.
stdout nullable
stdout?
: pinnacle.process.ChildStdout
This process's standard output, if any.
stderr nullable
stderr?
: pinnacle.process.ChildStderr
This process's standard error, if any.
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