Liking cljdoc? Tell your friends :D

hive-system.process.core

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.

Stream draining and process-tree teardown are shared with the IShell implementation — see hive-system.process.streams / .tree.

No hive-weave here on purpose: this namespace has to stay loadable under Babashka, and hive-weave.pool is not.

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.

Stream draining and process-tree teardown are shared with the IShell
implementation — see hive-system.process.streams / .tree.

No hive-weave here on purpose: this namespace has to stay loadable under
Babashka, and hive-weave.pool is not.
raw docstring

hive-system.process.liveness

Process liveness detection — single source of truth for is this pid alive? semantics across the hive ecosystem.

Use this instead of inlining kill -0, ProcessHandle/of, or backend- specific tricks. Liveness check is a system-level concern and belongs in hive-system (per the IProcess family of protocols), not in callers.

The LivenessSignal ADT is the closed sum of valid outcomes:

:liveness/alive — pid is owned by a live OS process :liveness/dead — pid was once valid but the process is gone (ESRCH) :liveness/unknown — pid is nil/non-integer, or the check itself raised transiently. Callers MUST NOT zombify on :unknown (degrade-soft semantics — protect against false positives during boot races, container migrations, and short-lived OS hiccups).

Process liveness detection — single source of truth for `is this pid alive?`
semantics across the hive ecosystem.

Use this instead of inlining `kill -0`, `ProcessHandle/of`, or backend-
specific tricks. Liveness check is a system-level concern and belongs in
hive-system (per the IProcess family of protocols), not in callers.

The `LivenessSignal` ADT is the closed sum of valid outcomes:

  :liveness/alive   — pid is owned by a live OS process
  :liveness/dead    — pid was once valid but the process is gone (ESRCH)
  :liveness/unknown — pid is nil/non-integer, or the check itself raised
                      transiently. Callers MUST NOT zombify on :unknown
                      (degrade-soft semantics — protect against false
                      positives during boot races, container migrations,
                      and short-lived OS hiccups).
raw docstring

hive-system.process.streams

Reading a child process's output without blocking on its descendants.

EOF on a process stream arrives when the LAST holder of the write end closes it, which is not when the command exits: a backgrounded grandchild inherits the pipe and holds it open. Every read here is therefore abandonable — it runs on a daemon thread and is collected with a BOUNDED deref, so a detached descendant cannot extend its caller's deadline.

Leaf namespace: java.io and clojure.java.io only. No hive-weave, so it loads under Babashka.

Reading a child process's output without blocking on its descendants.

EOF on a process stream arrives when the LAST holder of the write end closes
it, which is not when the command exits: a backgrounded grandchild inherits
the pipe and holds it open. Every read here is therefore abandonable — it
runs on a daemon thread and is collected with a BOUNDED deref, so a detached
descendant cannot extend its caller's deadline.

Leaf namespace: java.io and clojure.java.io only. No hive-weave, so it loads
under Babashka.
raw docstring

hive-system.process.tree

Destroying a process together with everything it spawned.

Killing only the direct child leaves grandchildren alive, holding the pipes and whatever resource the kill was meant to reclaim — a timeout that reaps just the shell reclaims nothing.

Leaf namespace: java.lang only. No hive-weave, so it loads under Babashka.

Destroying a process together with everything it spawned.

Killing only the direct child leaves grandchildren alive, holding the pipes
and whatever resource the kill was meant to reclaim — a timeout that reaps
just the shell reclaims nothing.

Leaf namespace: java.lang only. No hive-weave, so it loads under Babashka.
raw docstring

hive-system.process.worker

IWorker implementation — a warm request/response worker over a long-lived process (hive-system.process IProcess). Requests/responses are newline- delimited EDN; a monotonic :id correlates each response. Calls are single- flight via a hive-weave gate (1 permit); reads are timeout-bounded.

IWorker implementation — a warm request/response worker over a long-lived
process (hive-system.process IProcess). Requests/responses are newline-
delimited EDN; a monotonic :id correlates each response. Calls are single-
flight via a hive-weave gate (1 permit); reads are timeout-bounded.
raw docstring

cljdoc builds & hosts documentation for Clojure/Script libraries

Keyboard shortcuts
Ctrl+kJump to recent docs
Move to previous article
Move to next article
Ctrl+/Jump to the search field
× close