The following functions interface the process returned by run-program
:
This function returns t
if thing is a process.
Otherwise it returns nil
This function returns the process ID, an integer, for the process.
This function returns the current status of process, which is
one of :running
, :stopped
, :exited
, or
:signaled
.
This function returns either the exit code for process, if it
is :exited
, or the termination signal process if it is
:signaled
. The result is undefined for processes that are
still alive.
This function returns t
if someone used a Unix signal to
terminate the process and caused it to dump a Unix core image.
This function returns either the two-way stream connected to
process’s Unix PTY connection or nil
if there is none.
If the corresponding stream was created, these functions return the
input, output or error fd-stream. nil
is returned if there
is no stream.
This function returns the current function to call whenever
process’s status changes. This function takes the
process as a required argument. process-status-hook
is
setf
’able.
This function returns annotations supplied by users, and it is
setf
’able. This is available solely for users to associate
information with process without having to build a-lists or
hash tables of process structures.
&optional
check-for-stopped ¶This function waits for process to finish. If
check-for-stopped is non-nil
, this also returns when
process stops.
&optional
whom ¶This function sends the Unix signal to process.
Signal should be the number of the signal or a keyword with
the Unix name (for example, :sigsegv
). Whom should be
one of the following:
:pid
This is the default, and it indicates sending the signal to process only.
:process-group
This indicates sending the signal to process’s group.
:pty-process-group
This indicates sending the signal to
the process group currently in the foreground on the Unix PTY
connected to process. This last option is useful if the
running program is a shell, and you wish to signal the program
running under the shell, not the shell itself. If
process-pty
of process is nil
, using this option is
an error.
This function returns t
if process’s status is either
:running
or :stopped
.
This function closes all the streams associated with process. When you are done using a process, call this to reclaim system resources.