aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAndrew Innes1997-10-13 18:11:44 +0000
committerAndrew Innes1997-10-13 18:11:44 +0000
commitdb77d785fd3b53227e9f1c3036b4e2bc0deaa7b6 (patch)
tree3ca54f9d4c164727f10113ce2fc175a87fb5bf8a /src
parent4a80f0815d27df3374b81d0df17e584374feab0c (diff)
downloademacs-db77d785fd3b53227e9f1c3036b4e2bc0deaa7b6.tar.gz
emacs-db77d785fd3b53227e9f1c3036b4e2bc0deaa7b6.zip
Ensure standard handles are reset even if spawnve fails.
Diffstat (limited to 'src')
-rw-r--r--src/callproc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/callproc.c b/src/callproc.c
index 62b0b605f6f..1be4b4b2a12 100644
--- a/src/callproc.c
+++ b/src/callproc.c
@@ -1077,10 +1077,10 @@ child_setup (in, out, err, new_argv, set_pgrp, current_dir)
1077#ifdef WINDOWSNT 1077#ifdef WINDOWSNT
1078 /* Spawn the child. (See ntproc.c:Spawnve). */ 1078 /* Spawn the child. (See ntproc.c:Spawnve). */
1079 cpid = spawnve (_P_NOWAIT, new_argv[0], new_argv, env); 1079 cpid = spawnve (_P_NOWAIT, new_argv[0], new_argv, env);
1080 reset_standard_handles (in, out, err, handles);
1080 if (cpid == -1) 1081 if (cpid == -1)
1081 /* An error occurred while trying to spawn the process. */ 1082 /* An error occurred while trying to spawn the process. */
1082 report_file_error ("Spawning child process", Qnil); 1083 report_file_error ("Spawning child process", Qnil);
1083 reset_standard_handles (in, out, err, handles);
1084 return cpid; 1084 return cpid;
1085#else /* not WINDOWSNT */ 1085#else /* not WINDOWSNT */
1086 /* execvp does not accept an environment arg so the only way 1086 /* execvp does not accept an environment arg so the only way