1. Nic Ferrier
  2. emacs

Commits

Glenn Morris  committed 667300c

* 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.

  • Participants
  • Parent commits 387a259
  • Branches default

Comments (0)

Files changed (2)

File src/ChangeLog

View file
+2011-12-06  Glenn Morris  <rgm@gnu.org>
+
+	* process.c (start_process_unwind): Treat any pid <= 0, except -2,
+	as an error, not just -1.  (Bug#10217)
+
 2011-12-05  Chong Yidong  <cyd@gnu.org>
 
 	* keyboard.c (process_special_events): New function.

File src/process.c

View file
   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;