diff options
author | Leo Liu <sdl.web@gmail.com> | 2013-12-02 15:13:01 +0800 |
---|---|---|
committer | Leo Liu <sdl.web@gmail.com> | 2013-12-02 15:13:01 +0800 |
commit | 0518b057fe4e50664cb84bfb6d8ef24d81c94431 (patch) | |
tree | 11059affb87e0cc8431456f202ae656b45eacf75 /lisp/subr.el | |
parent | 3adc9c6dca2c52aa41165f112a4e875267c6315e (diff) | |
download | emacs-0518b057fe4e50664cb84bfb6d8ef24d81c94431.tar.gz |
* subr.el (process-live-p): Return nil for non-process.
* progmodes/sh-script.el (sh-shell-process):
* progmodes/octave.el (inferior-octave-process-live-p):
* progmodes/gdb-mi.el (gdb-delchar-or-quit)
(gdb-inferior-io-sentinel):
* emacs-lock.el (emacs-lock-live-process-p): All uses changed.
Fixes: debbugs:16023
Diffstat (limited to 'lisp/subr.el')
-rw-r--r-- | lisp/subr.el | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/lisp/subr.el b/lisp/subr.el index b22c719f010..6b1e99f337c 100644 --- a/lisp/subr.el +++ b/lisp/subr.el @@ -1885,9 +1885,11 @@ Signal an error if the program returns with a non-zero exit status." (defun process-live-p (process) "Returns non-nil if PROCESS is alive. A process is considered alive if its status is `run', `open', -`listen', `connect' or `stop'." - (memq (process-status process) - '(run open listen connect stop))) +`listen', `connect' or `stop'. Value is nil if PROCESS is not a +process." + (and (processp process) + (memq (process-status process) + '(run open listen connect stop)))) ;; compatibility |