changeset 55810:b2e8aa96ff9d

process.c (Fdelete_process): Do not call remove_process.
author Noah Friedman <friedman@splode.com>
date Fri, 28 May 2004 21:58:31 +0000
parents 52796407db51
children d8ee27fc17e9
files src/ChangeLog src/process.c
diffstat 2 files changed, 16 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/ChangeLog	Fri May 28 21:21:17 2004 +0000
+++ b/src/ChangeLog	Fri May 28 21:58:31 2004 +0000
@@ -1,3 +1,7 @@
+2004-05-28  Noah Friedman  <friedman@splode.com>
+
+	* process.c (Fdelete_process): Do not call remove_process.
+
 2004-05-28  Stefan Monnier  <monnier@iro.umontreal.ca>
 
 	* alloc.c (struct backtrace): Remove.
--- a/src/process.c	Fri May 28 21:21:17 2004 +0000
+++ b/src/process.c	Fri May 28 21:58:31 2004 +0000
@@ -774,7 +774,18 @@
       XSETINT (XPROCESS (process)->tick, ++process_tick);
       status_notify ();
     }
-  remove_process (process);
+  /* Do not call remove_process here; either status_notify has already done
+     it, or will do so the next time emacs polls for input.  Thus network
+     processes are not immediately removed, and their sentinel will be
+     called.
+
+     Since Fdelete_process is called by kill_buffer_processes, this also
+     means that a network process sentinel will run after the buffer is
+     dead, which would not be the case if status_notify() were called
+     unconditionally here.  This way process sentinels observe consistent
+     behavior with regard to buffer-live-p.
+  */
+  /* remove_process (process); */
   return Qnil;
 }