|ext:run-program program args &key env wait pty input if-input-does-not-exist output if-output-exists error if-error-exists element-type external-format||[Function]|
Create a new process and run the unix program in the file specified by the the pathname program. If the program is a relative pathname then it is firstly resolved against file://path/ which is initialized from the UNIX environment PATH list, and this path list is searched. Otherwise, if the program path is absolute it is resolved against file://localhost/.
The args are the standard arguments that can be passed to a Unix program. For no arguments use nil which means just the name of the program is passed as arg 0. Either return nil or a process structure.
The keyword arguments have the following meanings:
When the :pty, :input, :output, or :error argument is a stream, a new thread is created for each stream to read or write between the process and the stream. Operations on the stream will occur in the context of these threads.
Class precedence list:
ext:process, standard-object, ext:instance, t.
A structure encapsulating information about external programs executed via ext:run-program.
|ext:process-pid object||[Generic Function]|
The process ID, which is an integer.
Return the current status of process. The result is one of :running, :stopped, :exited, :signaled.
Returns t if the process is still alive, nil otherwise.
|ext:process-input object||[Generic Function]|
Return the input stream if any, otherwise nil. An input stream is created if the :input argument to ext:run-program is :stream. The stream must be closed to reclaim resources.
|ext:process-output object||[Generic Function]|
Return the output stream if any, otherwise nil. An output stream is created if the :output argument to ext:run-program is :stream. The stream must be closed to reclaim resources.
|ext:process-error object||[Generic Function]|
Return the error output stream if any, otherwise nil. An error stream is created if the :error argument to ext:run-program is :stream. The stream must be closed to reclaim resources.
|ext:process-wait process &optional check-for-stopped||[Function]|
Wait for the process to quit running for some reason. Returns process. If check-for-stopped is true then also return if the process stops.
Warning: for linuxthreads, only the parent thread may reap a child, and not other threads of the process. Other threads may also wait on the process but a status change will not be recognised until the parent thread checks the status. The linux new posix thread library (nptl) does not have this linux problem.
|ext:process-kill process signal &optional whom||[Function]|
Send the signal to process. The signal should be a valid signal number or a keyword of the standard UNIX signal name. If whom is :pid then send the signal to the process, or if whom is :process-group then send the signal to the process's group. Return true upon success otherwise nil and an error number.
|ext:process-exit-code object||[Generic Function]|
For a process that has exited return the exit code or the termination signal.
|ext:process-core-dumped object||[Generic Function]|
Return true if the process has dumped a core.