bug#61095: possible misuse of posix_spawn API on non-linux OSes

2023-01-27 Thread Omar Polo
Hello, I've noticed that test-system-cmds fails on OpenBSD-CURRENT while testing the update to guile 3.0.9: test-system-cmds: system* exit status was 127 rather than 42 FAIL: test-system-cmds Here's an excerpt of the ktrace of the child process while executing that specific test: (the fi

bug#61095: possible misuse of posix_spawn API on non-linux OSes

2023-01-27 Thread Omar Polo
Actually I can avoid the EBADF by checking that the fd is 'live' with something like fstat: [[[ Index: libguile/posix.c --- libguile/posix.c.orig +++ libguile/posix.c @@ -1325,8 +1325,12 @@ SCM_DEFINE (scm_fork, "primitive-fork", 0, 0, 0, static void close_inherited_fds_slow (posix_spawn_file_ac