Library for shelling out from Clojure.
Library for shelling out from Clojure.
(->>proc process from & {flush? :flush :or {flush? true} :as all})
Feed to a process's input stream with optional. Options passed are fed to clojure.java.io/copy. They are :encoding to set the encoding and :buffer-size to set the size of the buffer. :encoding defaults to UTF-8 and :buffer-size to 1024. If :flush is specified and is false, the process will be flushed after writing.
Feed to a process's input stream with optional. Options passed are fed to clojure.java.io/copy. They are :encoding to set the encoding and :buffer-size to set the size of the buffer. :encoding defaults to UTF-8 and :buffer-size to 1024. If :flush is specified and is false, the process will be flushed after writing.
(close-stdin proc)
Close the process's output stream (sending EOF).
Close the process's output stream (sending EOF).
(flush-stdin process)
Flush the output stream of a process.
Flush the output stream of a process.
(line<<-proc process ch)
Read a line from a process' :out or :err.
Read a line from a process' :out or :err.
(exec p r)
(exec p r callback id)
execute Runnable at thread asynchronously
execute Runnable at thread asynchronously
(self p)
return the pool object
return the pool object
(stop p)
shutdown the pool
shutdown the pool
(proc & args)
Spin off another process. Returns the process's input stream, output stream, and err stream as a map of :in, :out, and :err keys If passed the optional :dir and/or :env keyword options, the dir and enviroment will be set to what you specify. If you pass :verbose and it is true, commands will be printed. If it is set to :very, environment variables passed, dir, and the command will be printed. If passed the :clear-env keyword option, then the process will not inherit its environment from its parent process.
Spin off another process. Returns the process's input stream, output stream, and err stream as a map of :in, :out, and :err keys If passed the optional :dir and/or :env keyword options, the dir and enviroment will be set to what you specify. If you pass :verbose and it is true, commands will be printed. If it is set to :very, environment variables passed, dir, and the command will be printed. If passed the :clear-env keyword option, then the process will not inherit its environment from its parent process.
(proc->> process from to & args)
Stream :out or :err from a process to an ouput stream. Options passed are fed to clojure.java.io/copy. They are :encoding to set the encoding and :buffer-size to set the size of the buffer. :encoding defaults to UTF-8 and :buffer-size to 1024.
Stream :out or :err from a process to an ouput stream. Options passed are fed to clojure.java.io/copy. They are :encoding to set the encoding and :buffer-size to set the size of the buffer. :encoding defaults to UTF-8 and :buffer-size to 1024.
(proc->>stdout process ch & args)
Streams the output of the process to System/out
Streams the output of the process to System/out
(proc->>str process ch & args)
Streams the output of the process to a string and returns it.
Streams the output of the process to a string and returns it.
(string->>proc process s & args)
Feed the process some data from a string.
Feed the process some data from a string.
(wait-for process)
(wait-for process timeout)
Waits for the process to terminate (blocking the thread) and returns the exit code. If timeout is passed, it is assumed to be milliseconds to wait for the process to exit. If it does not exit in time, it is killed (with or without fire).
Waits for the process to terminate (blocking the thread) and returns the exit code. If timeout is passed, it is assumed to be milliseconds to wait for the process to exit. If it does not exit in time, it is killed (with or without fire).
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close