From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 2155) id 1CAEF3858C2D; Wed, 19 Apr 2023 19:13:45 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 1CAEF3858C2D DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cygwin.com; s=default; t=1681931625; bh=mF7fnAPqxvRPU0XMYyntTXHidSBnaF0wR5jKTFWMZZ8=; h=Date:From:To:Cc:Subject:Reply-To:References:In-Reply-To:From; b=P1a4CX+3HaGZ5aars3U6d3rSgN73B+SYo9Qgakc/pUr22tk/pwExFVYbfeKR8m6lq SXlWZfj+l8DsEiHew61v4VUQam9nkdeFIOUGI2Die08S7+ZxGDfEc/Ih+PUUNG/QUz fuivVz88w+eD2JRGFaNnNYIV5LdQDefDU5t6sFKs= Received: by calimero.vinschen.de (Postfix, from userid 500) id 4D0ABA80B9C; Wed, 19 Apr 2023 21:13:43 +0200 (CEST) Date: Wed, 19 Apr 2023 21:13:43 +0200 From: Corinna Vinschen To: Bruno Haible Cc: cygwin@cygwin.com Subject: Re: posix_spawn_file_actions_add[f]chdir_np Message-ID: Reply-To: cygwin@cygwin.com Mail-Followup-To: Bruno Haible , cygwin@cygwin.com References: <1752276.7aRn1RRit1@nimes> <5022555.upeRZZJTqa@nimes> <1962645.3CdzvNlvnA@nimes> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: List-Id: 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