GNU Emacs Lisp Reference Manual
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.
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.
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.
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
t.
(process-kill-without-query (get-process "shell"))
=> t