![]() | ![]() | ![]() | run-external-program | ![]() |
|
| program args &key input output wait => bidirectional-stream, os-process | [Function] |
Purpose
Run an external program.
Package :gbbopen-tools
Module :os-interface
Arguments and values
| program | A string specifying the name of the program to be run | |
| args | A list of strings passed to program as arguments | |
| input | A stream specification (default is :stream, see below)
| |
| output | A stream specification (default is :stream, see below)
| |
| wait | A generalized boolean (default is nil)
| |
| bidirectional-stream | A stream or nil
| |
| os-process | An implementation-dependent process representation or nil
|
Returns
Two values:
nil
nil
Errors
Use of a true value for wait and a :stream value for
input or output is problematic or an error in most
Common Lisp implementations.
Description
The values of input and output can be:
:stream (the default) which creates a stream that is
returned as the first result value; if both input and
output are specified as :stream, a bi-directional
stream is created and returned
LispWorks (non-Windows platforms) and SBCL do not use a search path for locating program, the full path must be specified in the program string.
See also
close-external-program-stream
Example
> (let ((stream (run-external-program "date" nil)))
(print (read-line stream))
(close-external-program-stream stream))
"Mon Jul 4 14:06:04 EDT 2005"
>
The GBBopen Project
![]() | ![]() | ![]() | run-external-program | ![]() |