1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-04-29 19:30:36 +02:00

Avoid mysterious "error no error" message in pipe

* libguile/posix.c (pipe)[!HAVE_PIPE2]: set errno to ENOSYS
   when pipe2 is missing
This commit is contained in:
Michael Gran 2022-11-10 14:48:50 -08:00
parent 591e10a121
commit 3c9052b261

View file

@ -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)