If Gnulib were not to override Cygwin's posix_spawn implementation, two tests would fail:
FAIL: test-posix_spawn_file_actions_addclose ============================================ ../../gltests/test-posix_spawn_file_actions_addclose.c:63: assertion 'posix_spawn_file_actions_addclose (&actions, bad_fd) == EBADF' failed FAIL test-posix_spawn_file_actions_addclose.exe (exit status: 134) FAIL: test-posix_spawnp-script ============================== subprocess terminated with unexpected exit status 0 FAIL test-posix_spawnp-script.exe (exit status: 1) The first of these failures is a problem in Gnulib's test. Fixed like this: 2023-04-16 Bruno Haible <br...@clisp.org> posix_spawn_file_actions_addclose tests: Avoid test failure on Cygwin. * tests/test-posix_spawn_file_actions_addclose.c (main): Skip an unportable test also on Cygwin. diff --git a/tests/test-posix_spawn_file_actions_addclose.c b/tests/test-posix_spawn_file_actions_addclose.c index f900415dae..f28017e585 100644 --- a/tests/test-posix_spawn_file_actions_addclose.c +++ b/tests/test-posix_spawn_file_actions_addclose.c @@ -55,8 +55,8 @@ main (void) ASSERT (posix_spawn_file_actions_addclose (&actions, -1) == EBADF); } /* This behaviour is not mandated by POSIX, but happens to pass on all - platforms except musl libc. */ -#if !defined MUSL_LIBC + platforms except musl libc and Cygwin. */ +#if !(defined MUSL_LIBC || defined __CYGWIN__) { int bad_fd = big_fd (); errno = 0;