# HG changeset patch # User Andrew Innes # Date 876766304 0 # Node ID c743e52dd2b0ec7227e357c975fa221fe0195236 # Parent 94f90d47cff188463bb97785980bf22661a60bab Ensure standard handles are reset even if spawnve fails. diff -r 94f90d47cff1 -r c743e52dd2b0 src/callproc.c --- a/src/callproc.c Mon Oct 13 18:06:22 1997 +0000 +++ b/src/callproc.c Mon Oct 13 18:11:44 1997 +0000 @@ -1077,10 +1077,10 @@ #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