diff --git a/src/process.c b/src/process.c index f923aff1cb..bc236c7e4c 100644 --- a/src/process.c +++ b/src/process.c @@ -1341,6 +1341,9 @@ The string argument is normally a multibyte string, except: && !EQ (p->command, Qt)) add_process_read_fd (p->infd); } + else { + fprintf (stderr, "p->infd < 0 in Fset_process_filter\n"); + } pset_filter (p, filter); @@ -7536,15 +7539,6 @@ status_notify (struct Lisp_Process *deleting_process, if (CONSP (p->status)) symbol = XCAR (p->status); - if (EQ (symbol, Qsignal) || EQ (symbol, Qexit) - || EQ (symbol, Qclosed)) - { - if (delete_exited_processes) - remove_process (proc); - else - deactivate_process (proc); - } - /* The actions above may have further incremented p->tick. So set p->update_tick again so that an error in the sentinel will not cause this code to be run again. */ @@ -7554,6 +7548,16 @@ status_notify (struct Lisp_Process *deleting_process, if (BUFFERP (p->buffer)) /* In case it uses %s in mode-line-format. */ bset_update_mode_line (XBUFFER (p->buffer)); + + if (EQ (symbol, Qsignal) || EQ (symbol, Qexit) + || EQ (symbol, Qclosed)) + { + if (delete_exited_processes) + remove_process (proc); + else + deactivate_process (proc); + } + } } /* end for */