![]() |
|
Message-ID: <aEWvh5suFabk9EGl@cloudsdale.the-delta.net.eu.org> Date: Sun, 8 Jun 2025 17:43:03 +0200 From: "Haelwenn (lanodan) Monnier" <haelwenn@...udsdale.the-delta.net.eu.org> To: musl@...ts.openwall.com Subject: Re: The `sigpause` function behavior does not fully comply with the POSIX specification [2025-06-08 16:38:51+0800] Tommy: >Hello: >I noticed this commit. >--> >https://git.musl-libc.org/cgit/musl/commit/src/signal/sigpause.c?id=06c5e4e832f4796be02c743270fb554f978de02c > >This commit changed the behavior of `sigpause`. When I passed an invalid >`sig` value, the `sigdelset` function returned -1 and set the error code to >EINVAL, which caused `sigpause` to return -1 and set the error code to >EINVAL. In the POSIX specification, `sigpause` can only return -1 if it >returns, and set the error code to `EINTR` (see >https://man7.org/linux/man-pages/man3/sigpause.3.html#RETURN_VALUE). Maybe >the current behavior of the `sigpause` function violates the POSIX >specification, so I would like to ask if this is a bug. This manpage isn't the POSIX standard but Linux own manpage (which for C documents glibc behavior). See https://pubs.opengroup.org/onlinepubs/9699919799/functions/sigpause.html for POSIX.1-2018 where EINVAL is allowed and sigpause returns SIG_ERR (defined by musl in <signal.h> to ((void (*)(int))-1) ). Also should be noted that POSIX.1-2024 removed "sighold(), sigpause(), and sigrelse()" with the following rationale: "Applications are recommended to use pthread_sigmask() or sigprocmask() instead of these functions." — https://pubs.opengroup.org/onlinepubs/9799919799/xrat/V4_xsh_chap01.html#tag_22_03_01_13 Best regards
Powered by blists - more mailing lists
Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.