Utilities for spawning processes and managing their lifecycle.
Linux Note: if you spawn a process that spawns its own children, killing the parent will not kill its children and you may be left with a zombie if you are not careful. See kill-r below.
Utilities for spawning processes and managing their lifecycle. Linux Note: if you spawn a process that spawns its own children, killing the parent will not kill its children and you may be left with a zombie if you are not careful. See kill-r below.
(collected-spawn cmd args {:keys [key silent? json->edn?] :as opts})
collect CP output as if it were an async exec call, but allow output logging during process execution. Spawns are not persistent but may be long running.
Returns pchan<[ ?js/error ?[exit-code stdout stderr] ]> where stdout/stderr json is automatically converted to edn where applicable. Cargo writes line delimited json to stdout regardless if it represents a clean exit or not. [0 [{:some :stdout} {:more :stdout}] ['some stderr' 'more stderr']
collect CP output as if it were an async exec call, but allow output logging during process execution. Spawns are not persistent but may be long running. Returns pchan<[ ?js/error ?[exit-code stdout stderr] ]> where stdout/stderr json is automatically converted to edn where applicable. Cargo writes line delimited json to stdout regardless if it represents a clean exit or not. [0 [{:some :stdout} {:more :stdout}] ['some stderr' 'more stderr']
(kill! id)
given a child-process id, kill it and remove reference from memory. Returns false if killing fails.
given a child-process id, kill it and remove reference from memory. Returns false if killing fails.
(kill-r pid)
kill a process and its children recursively
kill a process and its children recursively
(pgrep-P)
(pgrep-P pid)
Linux only. if no arg looks for children of current node process. if pid arg, looks for its children. @return {?IVector}
Linux only. if no arg looks for children of current node process. if pid arg, looks for its children. @return {?IVector}
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close