module

Autobot::Tools::CommandRunner

Runs a process with a timeout, capturing size-limited stdout and stderr.

Constants

DEFAULT_MAX_OUTPUT = 10000
IO_BUFFER_SIZE = 4096
SIGNAL_GRACE_PERIOD = 0.5.seconds

Class methods

run(command : String, args : Array(String), timeout : Int32, max_output_size : Int32 = DEFAULT_MAX_OUTPUT, chdir : String | Nil = nil, env : Process::Env = nil) : Result

The read ends are closed once the process settles so reader fibers never block on daemons that inherit and keep the pipe write ends open.

Source

Nested types