X-Recipient: archive-cygwin AT delorie DOT com DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org BF7F23857732 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cygwin.com; s=default; t=1681931638; bh=6au/0806XEQ1+4LoBSBN0T4+faNWwE9ncKg5lmkDO1s=; h=Date:To:Subject:References:In-Reply-To:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=FvhR+C30SFr+Cg8U9myrO2zmbAMLzhFAmAZ/xvVhaez9lnYbMcl5ADwIVmqshXxvX a2CxBcjhQnkDgP9nPHG3ovPmPDZiclzvD1xnUv8FBCE+ZkQqnLit/QhnZPgLEghXMI zSanUh9Vnkc25muZIwLXBDlpQuaFwU0qkEsN22UE= X-Original-To: cygwin AT cygwin DOT com Delivered-To: cygwin AT cygwin DOT com DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 1CAEF3858C2D Date: Wed, 19 Apr 2023 21:13:43 +0200 To: Bruno Haible Subject: Re: posix_spawn_file_actions_add[f]chdir_np Message-ID: Mail-Followup-To: Bruno Haible , cygwin AT cygwin DOT com References: <1752276 DOT 7aRn1RRit1 AT nimes> <5022555 DOT upeRZZJTqa AT nimes> <1962645 DOT 3CdzvNlvnA AT nimes> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: X-BeenThere: cygwin AT cygwin DOT com X-Mailman-Version: 2.1.29 Precedence: list List-Id: General Cygwin discussions and problem reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Corinna Vinschen via Cygwin Reply-To: cygwin AT cygwin DOT com Cc: Corinna Vinschen , cygwin AT cygwin DOT com Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: cygwin-bounces+archive-cygwin=delorie DOT com AT cygwin DOT com Sender: "Cygwin" 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 -- Problem reports: https://cygwin.com/problems.html FAQ: https://cygwin.com/faq/ Documentation: https://cygwin.com/docs.html Unsubscribe info: https://cygwin.com/ml/#unsubscribe-simple