The valid keyword/value pairs are:
:direction {:input|:output|:io}
:element-type element-type
:interrupt-off {t|nil}
:shell-type
A string
A keyword. Either:input or:io.
A symbol.
A boolean.
A shell type.
A file stream.
open-pipe is analogous to that ofpopen in the UNIX library. It creates a unidirectional pipe to/from a subprocess and returns a stream. The stream can be read from or written to as appropriate. :input. Bidirectional (i/o) pipes may be created by setting this keyword to:io. See the example below. open. The default value isstring-char. t, ensures that Ctrl+C (SIGINT) to the LispWorks image is ignored by the subprocess. SYSTEM 106 > (setq s (open-pipe "ls")) #<Pipe stream "ls"> SYSTEM 107 > (read-line s) "#draw-string.lisp#" NIL SYSTEM 108 > (read-line s) "#drawing-state.lisp#" NIL SYSTEM 109 >
SYSTEM 17 > (with-open-stream
(s (open-pipe "/bin/csh"
:direction :io
:buffered nil))
(write-line "whoami" s)
(read-line s))
"andrews@arrakis [users/andrews]> andrews"
NIL
SYSTEM 18 >