# HG changeset patch # User Richard M. Stallman # Date 763251008 0 # Node ID 132464faeaf4baac1a5b2ea6b677231565140e01 # Parent ec7e22ebd6b3f2d72c294d9b9628348cf690ceb4 Don't kill remaining processes if child exits. (call_process_exited): New variable. (Fcall_process): Set it. (call_process_cleanup): Test it. diff -r ec7e22ebd6b3 -r 132464faeaf4 src/callproc.c --- a/src/callproc.c Wed Mar 09 06:52:12 1994 +0000 +++ b/src/callproc.c Wed Mar 09 22:10:08 1994 +0000 @@ -95,6 +95,13 @@ extern Lisp_Object Vdoc_file_name; +/* Clean up when exiting Fcall_process. + On MSDOS, delete the temporary file on any kind of termination. + On Unix, kill the process and any children on termination by signal. */ + +/* Nonzero if this is termination due to exit. */ +static int call_process_exited; + #ifndef VMS /* VMS version is in vmsproc.c. */ static Lisp_Object @@ -120,6 +127,9 @@ #else /* not MSDOS */ register int pid = XFASTINT (Fcdr (fdpid)); + if (call_process_exited) + return Qnil; + if (EMACS_KILLPG (pid, SIGINT) == 0) { int count = specpdl_ptr - specpdl; @@ -373,6 +383,8 @@ return Qnil; } + call_process_exited = 0; + #ifdef MSDOS /* MSDOS needs different cleanup information. */ record_unwind_protect (call_process_cleanup, @@ -417,6 +429,10 @@ set_buffer_internal (old); + /* Don't kill any children that the subprocess may have left behind + when exiting. */ + call_process_exited = 1; + unbind_to (count, Qnil); if (synch_process_death)