guile-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Guile-commits] 25/25: Avoid mysterious "error no error" message in pipe


From: Mike Gran
Subject: [Guile-commits] 25/25: Avoid mysterious "error no error" message in pipe
Date: Thu, 10 Nov 2022 18:06:19 -0500 (EST)

mike121 pushed a commit to branch wip-mingw
in repository guile.

commit 3c9052b2614071c7af2a04dc1c9868e315c14e45
Author: Michael Gran <spk121@yahoo.com>
AuthorDate: Thu Nov 10 14:48:50 2022 -0800

    Avoid mysterious "error no error" message in pipe
    
    * libguile/posix.c (pipe)[!HAVE_PIPE2]: set errno to ENOSYS
       when pipe2 is missing
---
 libguile/posix.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/libguile/posix.c b/libguile/posix.c
index 116843bcf..274b4a16c 100644
--- a/libguile/posix.c
+++ b/libguile/posix.c
@@ -265,11 +265,13 @@ SCM_DEFINE (scm_pipe2, "pipe", 0, 1, 0,
 #else
   if (c_flags == 0)
     rv = pipe (fd);
-  else
+  else {
     /* '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;
+    errno = ENOSYS;
+  }
 #endif
 
   if (rv)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]