Go to the first, previous, next, last section, table of contents.


Deleting Processes

Deleting a process disconnects Emacs immediately from the subprocess, and removes it from the list of active processes. It sends a signal to the subprocess to make the subprocess terminate, but this is not guaranteed to happen immediately. The process object itself continues to exist as long as other Lisp objects point to it. The process mark continues to point to the same place as before (usually into a buffer where output from the process was being inserted).

You can delete a process explicitly at any time. Processes are deleted automatically after they terminate, but not necessarily right away. If you delete a terminated process explicitly before it is deleted automatically, no harm results.

User Option: delete-exited-processes
This variable controls automatic deletion of processes that have terminated (due to calling exit or to a signal). If it is nil, then they continue to exist until the user runs list-processes. Otherwise, they are deleted immediately after they exit.

Function: delete-process name
This function deletes the process associated with name, killing it with a SIGHUP signal. The argument name may be a process, the name of a process, a buffer, or the name of a buffer.

(delete-process "*shell*")
     => nil

Function: process-kill-without-query process &optional do-query
This function specifies whether Emacs should query the user if process is still running when Emacs is exited. If do-query is nil, the process will be deleted silently. Otherwise, Emacs will query about killing it.

The value is t if the process was formerly set up to require query, nil otherwise. A newly-created process always requires query.

(process-kill-without-query (get-process "shell"))
     => t


Go to the first, previous, next, last section, table of contents.