Liking cljdoc? Tell your friends :D

koine.process

Subprocesses, portable.

sh (run-to-completion) works on every host. spawn (a long-lived child with piped stdin/stdout) is the one MCP stdio transports need, and is the known gap on cljgo — see the cljgo work item in toolnexus ADR 0009.

Subprocesses, portable.

`sh` (run-to-completion) works on every host. `spawn` (a long-lived child
with piped stdin/stdout) is the one MCP stdio transports need, and is the
known gap on cljgo — see the cljgo work item in toolnexus ADR 0009.
raw docstring

Childclj/sprotocol

A running child process with open pipes.

A running child process with open pipes.

alive?clj/s

(alive? this)

True while the child is running.

True while the child is running.

close!clj/s

(close! this)

Close stdin, wait for exit, return the exit code.

Close stdin, wait for exit, return the exit code.

read-line!clj/s

(read-line! this)

Block for one line from the child's stdout. nil at EOF.

Block for one line from the child's stdout. nil at EOF.

send-line!clj/s

(send-line! this s)

Write s + newline to the child's stdin and flush.

Write s + newline to the child's stdin and flush.
raw docstring

shclj/s

(sh command)
(sh command {:keys [in dir env] :as opts})

Run command (a vector) to completion. Returns {:out :err :exit}. Never throws on a non-zero exit — that is a normal result. opts: :in (string on stdin) :dir :env

Run `command` (a vector) to completion. Returns {:out :err :exit}.
Never throws on a non-zero exit — that is a normal result.
opts: :in (string on stdin) :dir :env
raw docstring

spawnclj/s

(spawn command)
(spawn command {:keys [dir env]})

Start command (a vector) as a LONG-LIVED child with piped stdin/stdout and return a Child. This is what a line-delimited JSON-RPC transport (MCP stdio) requires; sh cannot express it.

opts: :dir :env

Start `command` (a vector) as a LONG-LIVED child with piped stdin/stdout and
return a Child. This is what a line-delimited JSON-RPC transport (MCP stdio)
requires; `sh` cannot express it.

opts: :dir :env
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