posix_spawn_file_actions_add[f]chdir_np
Corinna Vinschen
corinna-cygwin@cygwin.com
Wed Apr 19 19:13:43 GMT 2023
Hi Bruno,
On Apr 19 17:05, Corinna Vinschen via Cygwin wrote:
> On Apr 19 13:24, Bruno Haible via Cygwin wrote:
> > Note that there is a small inconsistency between implementations:
> > [...]
> > Confirmed by looking at the source code:
> > - musl libc:
> > if (fd < 0) return EBADF;
> > - FreeBSD:
> > if (fildes < 0)
> > return (EBADF);
>
> Ok, good to know. I implemented it like glibc, so fd isn't tested in
> posix_spawn_file_actions_addfchdir_np, but Austin group issue 1208 at
> https://www.austingroupbugs.net/view.php?id=1208 documents it like it's
> implemented in musl and FreeBSD:
>
> ERRORS
> The posix_spawn_file_actions_addfchdir( ) function shall fail if:
> [EBADF] The value specified by fildes is negative.
> [...]
>
> I will fix this in Cygwin.
Done: https://cygwin.com/cgit/newlib-cygwin/commit/?id=3124d8b436a8
> > [...]
> > Then run
> > $ make check
> > and it will run the unit tests against the Cygwin libc. It's likely
> > that you will see 1 test failure (test-posix_spawnp-script); but
> > other than that, there ought to be no test failures.
>
> Indeed, thanks a lot! I checked all the above and ran the testsuite.
> All tests pass except the test-posix_spawnp-script.exe testcase.
> Great!
I pushed the posix_spawnp patch for now, so all these tests PASS.
See https://cygwin.com/cgit/newlib-cygwin/commit/?id=da40bd6eaf40
Thanks,
Corinna
More information about the Cygwin
mailing list