1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-04-30 03:40:34 +02:00

Clear errno before CreateProcess for MinGW.

* libguile/posix-w32.c (start_child): Avoid recursing (and breaking any
PIPE setup) when running in WINE.
This commit is contained in:
Jan (janneke) Nieuwenhuizen 2020-04-01 18:03:09 +02:00 committed by Michael Gran
parent 76950b4281
commit f4b976aab9

View file

@ -685,6 +685,10 @@ start_child (const char *exec_file, char **argv,
cmdline = prepare_cmdline (exec_file, (const char * const *)argv, cmdline = prepare_cmdline (exec_file, (const char * const *)argv,
bin_sh_replaced); bin_sh_replaced);
/* When running in WINE, chances are we hit ENOENT (possibly
translated to ENOEXEC). */
errno = 0;
/* All set and ready to fly. Launch the child process. */ /* All set and ready to fly. Launch the child process. */
if (!CreateProcess (progfile, cmdline, NULL, NULL, TRUE, 0, env_block, NULL, if (!CreateProcess (progfile, cmdline, NULL, NULL, TRUE, 0, env_block, NULL,
&si, &pi)) &si, &pi))