clojure.java.process
(source)A process invocation API wrapping the Java process API.
The primary function is 'start' which starts a process and handles the
streams as directed. It returns the Process object. Use 'exit-ref' to wait
for completion and receive the exit value, and ‘stdout', 'stderr', 'stdin'
to access the process streams. The 'exec' function handles the common case
to 'start' a process, wait for process exit, and return stdout.
| Public Variable | Short Description |
|---|---|
| exec (clj) | Execute a command and on successful exit, return the captured output, else throw RuntimeException. |
| exit-ref (clj) | Given a Process (the output of 'start'), return a reference that can be used to wait for process completion then returns the exit value. |
| from-file (clj) | Coerce f to a file per clojure.java.io/file and return a ProcessBuilder.Redirect reading from the file. |
| start (clj) | Start an external command, defined in args. |
| stderr (clj) | Given a process, return the stderr of the external process (an InputStream). |
| stdin (clj) | Given a process, return the stdin of the external process (an OutputStream). |
| stdout (clj) | Given a process, return the stdout of the external process (an InputStream). |
| to-file (clj) | Coerce f to a file per clojure.java.io/file and return a ProcessBuilder.Redirect writing to the file. |