Skip to main content

babashka.process

$

  • $

    Convenience macro around `process`. Takes command as varargs. Options can be passed via metadata on the form or as a f...

*

  • *defaults*

    Dynamic var containing overridable default options. Use `alter-var-root` to change permanently or `binding` to change ...

A

  • alive?

    Returns `true` if the process is still running and false otherwise.

C

  • check

    Takes a process, waits until is finished and throws if exit code is non-zero.

D

  • destroy

    Destroys the process and returns the input arg. Takes process or map with :proc (`java.lang.ProcessBuilder`).

  • destroy-tree

    Same as `destroy` but also destroys all descendants. JDK9+ only. Falls back to `destroy` on older JVM versions.

E

  • exec

    Replaces the current process image with the process image specified by the given path invoked with the given args. Wor...

P

  • parse-args

    Parses arguments to `process` to map with: * `:prev`: a (previous) process whose input is piped into the current proc...

  • pb

    Returns a process builder (as record).

  • pipeline

    Returns the processes for one pipe created with -> or creates pipeline from multiple process builders. - When passi...

  • process

    Creates a child process. Takes a command (vector of strings or objects that will be turned into strings) and optionall...

  • process*

    Same as with `process` but called with parsed arguments (the result from `parse-args`)

S

  • sh

    Convenience function similar to `clojure.java.shell/sh` that sets `:out` and `:err` to `:string` by default and blocks...

  • shell

    Convenience function around `process` that was originally in `babashka.tasks`. Defaults to inheriting I/O: input is re...

  • start

    Takes a process builder, calls start and returns a process (as record).

T

  • tokenize

    Tokenize string to list of individual space separated arguments. If argument contains space you can wrap it with `'` o...