From 3c9052b2614071c7af2a04dc1c9868e315c14e45 Mon Sep 17 00:00:00 2001 From: Michael Gran Date: Thu, 10 Nov 2022 14:48:50 -0800 Subject: [PATCH] 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)