summaryrefslogtreecommitdiff
path: root/lisp/subr.el
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2011-05-31 19:49:51 -0700
committerPaul Eggert <eggert@cs.ucla.edu>2011-05-31 19:49:51 -0700
commit7e655d386397029b7ce6ac204fc41e5ddc92cf54 (patch)
tree75ffb3cd91672a517cfa643d6f45253c62526e41 /lisp/subr.el
parentccd9a01aa7b67dd3d71b49e3c30df04dd39b4cae (diff)
parent357e1c676cba36d5fa7b6819425a38cbad0c30cd (diff)
downloademacs-7e655d386397029b7ce6ac204fc41e5ddc92cf54.tar.gz
Merge from trunk.
Diffstat (limited to 'lisp/subr.el')
-rw-r--r--lisp/subr.el7
1 files changed, 7 insertions, 0 deletions
diff --git a/lisp/subr.el b/lisp/subr.el
index 4fe9987b95b..08099dc1fdd 100644
--- a/lisp/subr.el
+++ b/lisp/subr.el
@@ -1805,6 +1805,13 @@ Signal an error if the program returns with a non-zero exit status."
(forward-line 1))
(nreverse lines)))))
+(defun process-alive-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)))
+
;; compatibility
(make-obsolete