[Ecls-list] Input and output to subprocesses?
Juan Jose Garcia Ripoll
lisp at arrakis.es
Tue Nov 23 01:03:05 UTC 2004
Richard M Kreuter wrote:
>I see in the info manual that open-pipe returns a stream from which
>one can read the subprocess's output; is there any way to invoke a
>subprocess so that you can send it input and read its output? If not,
>would this be hard to add?
There is such a facility and it is called EXT::RUN-PROGRAM. The function
(EXT:RUN-PROGRAM COMMAND-NAME ARG-LIST &KEY
(INPUT :STREAM) (OUTPUT :STREAM) (ERROR T))
It is not yet documented but works more or less like CMUCL's, except for
the fact that, instead of returning the process object, it returns just
a bidirectional stream to which you can write and read. Currently, the
only options for the error output are :OUTPUT(use standard output), NIL
(discard output) or T (use parent's standard error output).
More information about the ecl-devel