]> git.eshelyaron.com Git - emacs.git/commitdiff
Ensure standard handles are reset even if spawnve fails.
authorAndrew Innes <andrewi@gnu.org>
Mon, 13 Oct 1997 18:11:44 +0000 (18:11 +0000)
committerAndrew Innes <andrewi@gnu.org>
Mon, 13 Oct 1997 18:11:44 +0000 (18:11 +0000)
src/callproc.c

index 62b0b605f6ffdcfae10ea97788404a94c2321092..1be4b4b2a129262da97c8349c9e9d7e2350bedb9 100644 (file)
@@ -1077,10 +1077,10 @@ child_setup (in, out, err, new_argv, set_pgrp, current_dir)
 #ifdef WINDOWSNT
   /* Spawn the child.  (See ntproc.c:Spawnve).  */
   cpid = spawnve (_P_NOWAIT, new_argv[0], new_argv, env);
+  reset_standard_handles (in, out, err, handles);
   if (cpid == -1)
     /* An error occurred while trying to spawn the process.  */
     report_file_error ("Spawning child process", Qnil);
-  reset_standard_handles (in, out, err, handles);
   return cpid;
 #else /* not WINDOWSNT */
   /* execvp does not accept an environment arg so the only way