From: Glenn Morris Date: Tue, 6 Dec 2011 08:17:35 +0000 (-0800) Subject: * src/process.c (start_process_unwind): Treat any pid <= 0, except -2, X-Git-Tag: emacs-pretest-24.0.93~217 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=2bf2618007dd1f5038ae741a693c3924aee86e78;p=emacs.git * src/process.c (start_process_unwind): Treat any pid <= 0, except -2, as an error, not just -1. For example, make_process inits the pid to 0. Fixes: debbugs:10217 --- diff --git a/src/ChangeLog b/src/ChangeLog index e22d6cb8cfb..30a504c4bda 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2011-12-06 Glenn Morris + + * process.c (start_process_unwind): Treat any pid <= 0, except -2, + as an error, not just -1. (Bug#10217) + 2011-12-05 Chong Yidong * keyboard.c (process_special_events): New function. diff --git a/src/process.c b/src/process.c index 05c4be27550..4b0f90b58af 100644 --- a/src/process.c +++ b/src/process.c @@ -1521,8 +1521,9 @@ start_process_unwind (Lisp_Object proc) if (!PROCESSP (proc)) abort (); - /* Was PROC started successfully? */ - if (XPROCESS (proc)->pid == -1) + /* Was PROC started successfully? + -2 is used for a pty with no process, eg for gdb. */ + if (XPROCESS (proc)->pid <= 0 && XPROCESS (proc)->pid != -2) remove_process (proc); return Qnil;