From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Tomas Volf <~@wolfsden.cz> Newsgroups: gmane.lisp.guile.bugs Subject: bug#72547: [PATCH 9/9] posix.c: Set errno when pipe2 is not available and flags provided. Date: Sat, 10 Aug 2024 00:54:35 +0200 Message-ID: <20240809225435.19028-9-~@wolfsden.cz> References: <20240809225435.19028-1-~@wolfsden.cz> Mime-Version: 1.0 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="22953"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Tomas Volf <~@wolfsden.cz> To: 72547@debbugs.gnu.org Original-X-From: bug-guile-bounces+guile-bugs=m.gmane-mx.org@gnu.org Sat Aug 10 00:56:30 2024 Return-path: Envelope-to: guile-bugs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1scYX8-0005lZ-1e for guile-bugs@m.gmane-mx.org; Sat, 10 Aug 2024 00:56:30 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1scYWL-00063K-DZ; Fri, 09 Aug 2024 18:55:41 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1scYWH-00061B-UI for bug-guile@gnu.org; Fri, 09 Aug 2024 18:55:37 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1scYWH-00021S-K9 for bug-guile@gnu.org; Fri, 09 Aug 2024 18:55:37 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:References:In-Reply-To:Date:From:To:Subject; bh=cbsSTGoqgMw95IcYtH6K5/MZSeweZJUlcS1yFn/w6kQ=; b=l74T+tlmmYdr+JxVS3SoUopUQG5kNPraf/Vtoc6vRUzfbNDJrvReNrpcVGhEU8zbt05iPan0LgvCUfvyuH6PKMlXHTEBdXuHTPtNydjlhvir+en+vNTKhxo4xN6o0Fod6YwnyYdb9q1bhnijck0vqaciLmnUhWhSShmTRmOdNnbzdraCzV4B9oZm/bpTqPpHwr3AnXtutu3zS1TH5W7r34d8b/qCbVc8hSFxRHTI8S5CbNCbt89a/tyZrGxyx0j76PNGUEhVl9yw5iKsjilZ9qsDcWP4DeDGZ+zRsgHhfOMxm5KIaSqzQlh0h/rwv8ZrIMnpWP3acp69oseJvnjUJw==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1scYWk-00088v-2O for bug-guile@gnu.org; Fri, 09 Aug 2024 18:56:06 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Tomas Volf <~@wolfsden.cz> Original-Sender: "Debbugs-submit" Resent-CC: bug-guile@gnu.org Resent-Date: Fri, 09 Aug 2024 22:56:06 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 72547 X-GNU-PR-Package: guile X-GNU-PR-Keywords: patch Original-Received: via spool by 72547-submit@debbugs.gnu.org id=B72547.172324412231181 (code B ref 72547); Fri, 09 Aug 2024 22:56:06 +0000 Original-Received: (at 72547) by debbugs.gnu.org; 9 Aug 2024 22:55:22 +0000 Original-Received: from localhost ([127.0.0.1]:38749 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1scYW1-00086m-RQ for submit@debbugs.gnu.org; Fri, 09 Aug 2024 18:55:22 -0400 Original-Received: from wolfsden.cz ([37.205.8.62]:57798) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <~@wolfsden.cz>) id 1scYVv-00085P-1I for 72547@debbugs.gnu.org; Fri, 09 Aug 2024 18:55:15 -0400 Original-Received: by wolfsden.cz (Postfix, from userid 104) id 3CCDB2A8B24; Fri, 9 Aug 2024 22:54:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=wolfsden.cz; s=mail; t=1723244086; bh=dXSmkQkcyvWGTggtcZo8ZDifP8IrIAF0rQbSpmWZGVg=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=e9JVWGP/Xmx/pGcOiJB1zpqu6RzC3gaPfwd798DxDrg0dx1oXLEmeQOZ0HjkU3CcJ u8jDV44JPb57rdZPGX4zNkF1nVtZ14xGqag7bBqCKcFVplrCUqcywQLaGw1ZEH5OHU ML81lap1XMAg++gtz9iU29XkOzBtfOuRh75n2qITuAOyH64M7T2xCId7dn0zfHHRSC aygDviKq4Au749wvlI2TlAWko9bgJl+4kp3WgRKS/1QfI6MRaKYxY5pqkNJmNlzfE3 F4fF8kAo+dbsx5XEqbL9vCbTDT2ej1i/EvqntL9uWYzRVtptLgYSZJcIynyeSOYUyJ ly3vD9JbjSn/mFJPbgaf49OJ3y8vDNwT4aQXIUS8xPgK62YqM636dbl1PzzONpJ4Ql 2qyaFvpL1yd3vj2X2B113LY+ix5iBHqFgjOivG2Y+2DOAC2EP1D1TD5m3oi4CozwdJ 9VCr9w7AzR2GtKj0kmG5xAZPTDX73X5CmcAJ6tsibBKR85hKP+irjMYZaiW9dV9rbw tqKNMIBPnO0z5aPHfsnHU0MxhPjQsZZzbuZxayR+NxMwbRMcPd8KLSN/ARMpBH36ZR Hy1UvXR7ukp5DbSVbXcBAs/E2NqNiyknmrTBvT4+E+V5auxQTRa4h3ptsWpWzLJCus nXmXxb9RDO4CA0vCUV8nFlDI= Original-Received: from localhost (unknown [146.70.134.146]) by wolfsden.cz (Postfix) with ESMTPSA id EBECF2A9B0F; Fri, 9 Aug 2024 22:54:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=wolfsden.cz; s=mail; t=1723244086; bh=dXSmkQkcyvWGTggtcZo8ZDifP8IrIAF0rQbSpmWZGVg=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=e9JVWGP/Xmx/pGcOiJB1zpqu6RzC3gaPfwd798DxDrg0dx1oXLEmeQOZ0HjkU3CcJ u8jDV44JPb57rdZPGX4zNkF1nVtZ14xGqag7bBqCKcFVplrCUqcywQLaGw1ZEH5OHU ML81lap1XMAg++gtz9iU29XkOzBtfOuRh75n2qITuAOyH64M7T2xCId7dn0zfHHRSC aygDviKq4Au749wvlI2TlAWko9bgJl+4kp3WgRKS/1QfI6MRaKYxY5pqkNJmNlzfE3 F4fF8kAo+dbsx5XEqbL9vCbTDT2ej1i/EvqntL9uWYzRVtptLgYSZJcIynyeSOYUyJ ly3vD9JbjSn/mFJPbgaf49OJ3y8vDNwT4aQXIUS8xPgK62YqM636dbl1PzzONpJ4Ql 2qyaFvpL1yd3vj2X2B113LY+ix5iBHqFgjOivG2Y+2DOAC2EP1D1TD5m3oi4CozwdJ 9VCr9w7AzR2GtKj0kmG5xAZPTDX73X5CmcAJ6tsibBKR85hKP+irjMYZaiW9dV9rbw tqKNMIBPnO0z5aPHfsnHU0MxhPjQsZZzbuZxayR+NxMwbRMcPd8KLSN/ARMpBH36ZR Hy1UvXR7ukp5DbSVbXcBAs/E2NqNiyknmrTBvT4+E+V5auxQTRa4h3ptsWpWzLJCus nXmXxb9RDO4CA0vCUV8nFlDI= X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240809225435.19028-1-~@wolfsden.cz> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-guile@gnu.org List-Id: "Bug reports for GUILE, GNU's Ubiquitous Extension Language" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guile-bounces+guile-bugs=m.gmane-mx.org@gnu.org Original-Sender: bug-guile-bounces+guile-bugs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.lisp.guile.bugs:10947 Archived-At: If pipe2 is not available (e.g. on MacOS) and flags are set, SCM_SYSERROR was correctly signaled, however errno was not set, so it reported as: Undefined error: 0 That sucks both in tests (the test is not skipped) and in actual usage (user has no idea what went wrong). So set errno to ENOSYS as well. * libguile/posix.c (scm_pipe2) [!HAVE_PIPE2] : Set errno to ENOSYS. --- libguile/posix.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libguile/posix.c b/libguile/posix.c index 9a873b5a1..986dcc7d0 100644 --- a/libguile/posix.c +++ b/libguile/posix.c @@ -282,7 +282,7 @@ SCM_DEFINE (scm_pipe2, "pipe", 0, 1, 0, /* 'pipe2' cannot be emulated on systems that lack it: calling 'fnctl' afterwards to set the relevant flags is not equivalent because it's not atomic. */ - rv = ENOSYS; + rv = errno = ENOSYS; #endif if (rv) -- 2.45.2