From: Tommy <tommyskypromax@gmail.com>
To: musl@lists.openwall.com
Subject: [musl] The `sigpause` function behavior does not fully comply with the POSIX specification
Date: Sun, 8 Jun 2025 16:38:51 +0800 [thread overview]
Message-ID: <CAMdrHjB9ecQas6GD=1S9AGmdXfC3FQGet3YtQXyt8QG3C6T=wQ@mail.gmail.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 682 bytes --]
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.
[-- Attachment #2: Type: text/html, Size: 968 bytes --]
next reply other threads:[~2025-06-08 11:12 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-06-08 8:38 Tommy [this message]
[not found] ` <aEWvh5suFabk9EGl@cloudsdale.the-delta.net.eu.org>
[not found] ` <f96afb6c-3383-4538-a2c6-e9055365b3b7@koorogi.info>
[not found] ` <20250608170923.GM1827@brightrain.aerifal.cx>
[not found] ` <3a448a87-4bcb-4c1c-bf78-b3c3d7ee4a29@koorogi.info>
[not found] ` <20250608184932.GN1827@brightrain.aerifal.cx>
[not found] ` <aEbDlK7qUVEVkTaP@snips.stderr.spb.ru>
2025-06-09 18:15 ` [musl] " Thorsten Glaser
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAMdrHjB9ecQas6GD=1S9AGmdXfC3FQGet3YtQXyt8QG3C6T=wQ@mail.gmail.com' \
--to=tommyskypromax@gmail.com \
--cc=musl@lists.openwall.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/musl/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).