IProcess implementation via java.lang.ProcessBuilder / ProcessHandle. Long-lived process lifecycle: spawn returns a live handle; wait/signal/pipe act on it. All operations return hive-dsl Result.
IProcess implementation via java.lang.ProcessBuilder / ProcessHandle. Long-lived process lifecycle: spawn returns a live handle; wait/signal/pipe act on it. All operations return hive-dsl Result.
(make-process-manager)(make-process-manager opts)Create a ProcessManager with optional default spawn opts (:dir, :env, :redirect-err?).
Create a ProcessManager with optional default spawn opts (:dir, :env, :redirect-err?).
(pipe! from-handle to-handle)Pipe from-handle's stdout into to-handle's stdin on a pooled pump thread. Returns Result {:from-pid :to-pid :pump}.
Pipe from-handle's stdout into to-handle's stdin on a pooled pump thread.
Returns Result {:from-pid :to-pid :pump}.(signal! handle signal)Signal a handle. signal ∈ #{:term :kill :tree} or any POSIX signal keyword (e.g. :int, :hup). Returns Result.
Signal a handle. signal ∈ #{:term :kill :tree} or any POSIX signal keyword
(e.g. :int, :hup). Returns Result.(spawn! cmd)(spawn! cmd opts)Spawn a long-lived process. Returns Result with the live handle {:pid :process :stdin :stdout :stderr :cmd}. cmd is a string (sh -c) or an arg vector. Opts: :dir, :env, :redirect-err?.
Spawn a long-lived process. Returns Result with the live handle
{:pid :process :stdin :stdout :stderr :cmd}. cmd is a string (sh -c) or an
arg vector. Opts: :dir, :env, :redirect-err?.(wait! handle timeout-ms)Wait up to timeout-ms for a handle to exit, draining its output. Returns Result {:exit-code :stdout :stderr}, or (err :process/timeout) and force-kills on deadline.
Wait up to timeout-ms for a handle to exit, draining its output. Returns
Result {:exit-code :stdout :stderr}, or (err :process/timeout) and force-kills
on deadline.cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |