Next: Input to Processes, Previous: Deleting Processes, Up: Processes [Contents][Index]
Several functions return information about processes.
list-processes is provided for interactive use.
This command displays a listing of all living processes. In addition,
it finally deletes any process whose status was ‘Exited’ or
‘Signaled’. It returns nil.
This function returns a list of all processes that have not been deleted.
(process-list)
⇒ (#<process display-time> #<process shell>)
This function returns the process named process-name. If
process-name is a string and there is no process with that name, the
value is nil. If process-name is actually a process, it is
returned as given. (That is not very useful, so the argument is usually
a name.) For example:
(get-process "shell")
⇒ #<process shell>
This function returns the command that was executed to start process. This is a list of strings, the first string being the program executed and the rest of the strings being the arguments that were given to the program.
(process-command (get-process "shell"))
⇒ ("/bin/csh" "-i")
This function returns the PID of process. This is an integer that distinguishes the process process from all other processes running on the same computer at the current time. The PID of a process is chosen by the operating system kernel when the process is started and remains constant as long as the process exists.
This function returns the name of process.
This function returns the status of process as a symbol. The argument process must be a process, a buffer, a process name (string) or a buffer name (string).
The possible values for an actual subprocess are:
runfor a process that is running.
stopfor a process that is stopped but continuable.
exitfor a process that has exited.
signalfor a process that has received a fatal signal.
openfor a network connection that is open.
closedfor a network connection that is closed. Once a connection is closed, you cannot reopen it, though you might be able to open a new connection to the same place.
nilif process does not identify an existing process.
(process-status "shell")
⇒ run
(process-status (get-buffer "*shell*"))
⇒ run
x
⇒ #<process xx<1>>
(process-status x)
⇒ exit
For a network connection, process-status returns one of the symbols
open or closed. The latter means that the other side
closed the connection, or SXEmacs did delete-process.
In earlier Emacs versions (prior to version 19), the status of a network
connection was run if open, and exit if closed.
This function returns whether process will be killed without
querying the user, if it is running when SXEmacs is exited. The default
value is nil.
This function returns the exit status of process or the signal
number that killed it. (Use the result of process-status to
determine which of those it is.) If process has not yet
terminated, the value is 0.
This function returns the terminal name that process is using for
its communication with SXEmacs—or nil if it is using pipes
instead of a terminal (see process-connection-type in
Asynchronous Processes).
Next: Input to Processes, Previous: Deleting Processes, Up: Processes [Contents][Index]