extern Lisp_Object Vdoc_file_name;
\f
+/* 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
#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;
return Qnil;
}
+ call_process_exited = 0;
+
#ifdef MSDOS
/* MSDOS needs different cleanup information. */
record_unwind_protect (call_process_cleanup,
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)