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
If query-only is non-
nilthen it lists only processes whose query flag is non-
nil. See Query Before Exit.
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 name, or
nilif there is none. An error is signaled if name is not a string.(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 information about how a network or serial process was set up. For a network process, when key is
nil, it returns
)which specifies what you connected to. For a serial process, when key is
nil, it returns
). For an ordinary child process, this function always returns
If key is
t, the value is the complete status information for the connection, server, or serial port; that is, the list of keywords and values specified in
make-serial-process, except that some of the values represent the current status instead of what you specified.
For a network process:
- The associated value is the process buffer.
- The associated value is the process filter function.
- The associated value is the process sentinel function.
- In a connection, the address in internal format of the remote peer.
- The local address, in internal format.
- In a server, if you specified
tfor service, this value is the actual port number.
:remoteare included even if they were not specified explicitly in
For a serial process, see
serial-process-configurefor a list of keys.
If key is a keyword, the function returns the value corresponding to that keyword.
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 status of process-name as a symbol. The argument process-name must be a process, a buffer, or a process name (a string).
The possible values for an actual subprocess are:
- for a process that is running.
- for a process that is stopped but continuable.
- for a process that has exited.
- for a process that has received a fatal signal.
- for a network connection that is open.
- for 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.
- for a non-blocking connection that is waiting to complete.
- for a non-blocking connection that has failed to complete.
- for a network server that is listening.
- if process-name is not the name of an existing process.(process-status (get-buffer "*shell*")) ⇒ run x ⇒ #<process xx<1>> (process-status x) ⇒ exit
For a network connection,
process-statusreturns one of the symbols
closed. The latter means that the other side closed the connection, or Emacs did
This function returns the symbol
networkfor a network connection or server,
serialfor a serial port connection, or
realfor a real subprocess.
This function returns the exit status of process or the signal number that killed it. (Use the result of
process-statusto 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 Emacs—or
nilif it is using pipes instead of a terminal (see
process-connection-typein Asynchronous Processes).
This function returns a cons cell describing the coding systems in use for decoding output from process and for encoding input to process (see Coding Systems). The value has this form:(coding-system-for-decoding . coding-system-for-encoding)
This function specifies the coding systems to use for subsequent output from and input to process. It will use decoding-system to decode subprocess output, and encoding-system to encode subprocess input.
Every process also has a property list that you can use to store miscellaneous values associated with the process.
This function returns the value of the propname property of process.
This function sets the value of the propname property of process to value.
This function sets the process plist of process to plist.