janneke pushed a commit to branch wip-mingw in repository guile. commit 722351eb786fe79db918d2dbeaf2c592faf4e05e Author: Jan (janneke) Nieuwenhuizen <jann...@gnu.org> AuthorDate: Wed Apr 1 18:03:09 2020 +0200
Clear errno before CreateProcess for MinGW. * libguile/posix-w32.c (start_child): Avoid recursing (and breaking any PIPE setup) when running in WINE. --- libguile/posix-w32.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/libguile/posix-w32.c b/libguile/posix-w32.c index f11c526..bfeb971 100644 --- a/libguile/posix-w32.c +++ b/libguile/posix-w32.c @@ -618,6 +618,10 @@ start_child (const char *exec_file, char **argv, intptr_t pid; int bin_sh_replaced = 0; + /* When running in WINE, chances are we hit ENOENT (possibly transated + to ENOEXEC). */ + errno = 0; + if (!reading) c2p[1] = outfd; if (!writing)