mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-02-22 04:47:34 +00:00
Ensure standard handles are reset even if spawnve fails.
This commit is contained in:
parent
4a80f0815d
commit
db77d785fd
1 changed files with 1 additions and 1 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in a new issue