- RUN-PROGRAM will either return NIL or a PROCESS structure. See the CMU
- Common Lisp Users Manual for details about the PROCESS structure.
-
- notes about Unix environments (as in the :ENVIRONMENT and :ENV args):
- 1. The SBCL implementation of RUN-PROGRAM, like Perl and many other
- programs, but unlike the original CMU CL implementation, copies
- the Unix environment by default.
- 2. Running Unix programs from a setuid process, or in any other
- situation where the Unix environment is under the control of someone
- else, is a mother lode of security problems. If you are contemplating
- doing this, read about it first. (The Perl community has a lot of good
- documentation about this and other security issues in script-like
- programs.)
-
- The keyword arguments have the following meanings:
- :ENVIRONMENT
- a list of SIMPLE-STRINGs describing the new Unix environment (as
- in \"man environ\"). The default is to copy the environment of
- the current process.
- :ENV
- an alternative lossy representation of the new Unix environment,
- for compatibility with CMU CL
- :WAIT
- If non-NIL (default), wait until the created process finishes. If
- NIL, continue running Lisp until the program finishes.
- :PTY
- Either T, NIL, or a stream. Unless NIL, the subprocess is established
- under a PTY. If :pty is a stream, all output to this pty is sent to
- this stream, otherwise the PROCESS-PTY slot is filled in with a stream
- connected to pty that can read output and write input.
- :INPUT
- Either T, NIL, a pathname, a stream, or :STREAM. If T, the standard
- input for the current process is inherited. If NIL, /dev/null
- is used. If a pathname, the file so specified is used. If a stream,
- all the input is read from that stream and send to the subprocess. If
- :STREAM, the PROCESS-INPUT slot is filled in with a stream that sends
- its output to the process. Defaults to NIL.
- :IF-INPUT-DOES-NOT-EXIST (when :INPUT is the name of a file)
- can be one of:
- :ERROR to generate an error
- :CREATE to create an empty file
- NIL (the default) to return NIL from RUN-PROGRAM
- :OUTPUT
- Either T, NIL, a pathname, a stream, or :STREAM. If T, the standard
- output for the current process is inherited. If NIL, /dev/null
- is used. If a pathname, the file so specified is used. If a stream,
- all the output from the process is written to this stream. If
- :STREAM, the PROCESS-OUTPUT slot is filled in with a stream that can
- be read to get the output. Defaults to NIL.
- :IF-OUTPUT-EXISTS (when :OUTPUT is the name of a file)
- can be one of:
- :ERROR (the default) to generate an error
- :SUPERSEDE to supersede the file with output from the program
- :APPEND to append output from the program to the file
- NIL to return NIL from RUN-PROGRAM, without doing anything
- :ERROR and :IF-ERROR-EXISTS
- Same as :OUTPUT and :IF-OUTPUT-EXISTS, except that :ERROR can also be
- specified as :OUTPUT in which case all error output is routed to the
- same place as normal output.
- :STATUS-HOOK
- This is a function the system calls whenever the status of the
- process changes. The function takes the process as an argument."
+ RUN-PROGRAM will return a PROCESS structure or NIL on failure.
+ See the CMU Common Lisp Users Manual for details about the
+ PROCESS structure.
+
+ Notes about Unix environments (as in the :ENVIRONMENT and :ENV args):
+
+ - The SBCL implementation of RUN-PROGRAM, like Perl and many other
+ programs, but unlike the original CMU CL implementation, copies
+ the Unix environment by default.
+
+ - Running Unix programs from a setuid process, or in any other
+ situation where the Unix environment is under the control of someone
+ else, is a mother lode of security problems. If you are contemplating
+ doing this, read about it first. (The Perl community has a lot of good
+ documentation about this and other security issues in script-like
+ programs.)
+
+ The &KEY arguments have the following meanings:
+
+ :ENVIRONMENT
+ a list of SIMPLE-BASE-STRINGs describing the new Unix environment
+ (as in \"man environ\"). The default is to copy the environment of
+ the current process.
+ :ENV
+ an alternative lossy representation of the new Unix environment,
+ for compatibility with CMU CL
+ :SEARCH
+ Look for PROGRAM in each of the directories along the $PATH
+ environment variable. Otherwise an absolute pathname is required.
+ (See also FIND-EXECUTABLE-IN-SEARCH-PATH)
+ :WAIT
+ If non-NIL (default), wait until the created process finishes. If
+ NIL, continue running Lisp until the program finishes.
+ :PTY
+ Either T, NIL, or a stream. Unless NIL, the subprocess is established
+ under a PTY. If :pty is a stream, all output to this pty is sent to
+ this stream, otherwise the PROCESS-PTY slot is filled in with a stream
+ connected to pty that can read output and write input.
+ :INPUT
+ Either T, NIL, a pathname, a stream, or :STREAM. If T, the standard
+ input for the current process is inherited. If NIL, /dev/null
+ is used. If a pathname, the file so specified is used. If a stream,
+ all the input is read from that stream and send to the subprocess. If
+ :STREAM, the PROCESS-INPUT slot is filled in with a stream that sends
+ its output to the process. Defaults to NIL.
+ :IF-INPUT-DOES-NOT-EXIST (when :INPUT is the name of a file)
+ can be one of:
+ :ERROR to generate an error
+ :CREATE to create an empty file
+ NIL (the default) to return NIL from RUN-PROGRAM
+ :OUTPUT
+ Either T, NIL, a pathname, a stream, or :STREAM. If T, the standard
+ output for the current process is inherited. If NIL, /dev/null
+ is used. If a pathname, the file so specified is used. If a stream,
+ all the output from the process is written to this stream. If
+ :STREAM, the PROCESS-OUTPUT slot is filled in with a stream that can
+ be read to get the output. Defaults to NIL.
+ :IF-OUTPUT-EXISTS (when :OUTPUT is the name of a file)
+ can be one of:
+ :ERROR (the default) to generate an error
+ :SUPERSEDE to supersede the file with output from the program
+ :APPEND to append output from the program to the file
+ NIL to return NIL from RUN-PROGRAM, without doing anything
+ :ERROR and :IF-ERROR-EXISTS
+ Same as :OUTPUT and :IF-OUTPUT-EXISTS, except that :ERROR can also be
+ specified as :OUTPUT in which case all error output is routed to the
+ same place as normal output.
+ :STATUS-HOOK
+ This is a function the system calls whenever the status of the
+ process changes. The function takes the process as an argument."