Smith::Tools::BashJob
Inherits Reference < Object
A shell command that outlives the tool call that started it.
Output goes to a file from the very first byte, never to a buffer. That is what makes auto-backgrounding seamless: a command that outruns its timeout is simply not waited on any longer — nothing is re-attached, re-run, or thrown away.
Constructors
new(id : String, command : String, log_path : String, process : Process)
SourceInstance methods
command
Sourceexit_code
Sourceid
Sourcekill(grace : Time::Span = 5.seconds) : Nil
Sourcelog_path
Sourceread_new(filter : Regex | Nil = nil) : String
Only what has arrived since the last call. A tail -f job would
otherwise push its whole log into the context on every read.
running?
Sourceruntime
Sourcestarted_at
Sourcestatus
Sourcewait
Blocks until the job ends, however long that takes.
Deliberately not wait(Time::Span::MAX), which reads like the same
thing: the event loop arms a timer at now + span, and that overflows.
A deadline that cannot be represented is not a deadline — so this arms
no timer at all.