* [musl] The `sigpause` function behavior does not fully comply with the POSIX specification
@ 2025-06-08 8:38 Tommy
[not found] ` <aEWvh5suFabk9EGl@cloudsdale.the-delta.net.eu.org>
0 siblings, 1 reply; 2+ messages in thread
From: Tommy @ 2025-06-08 8:38 UTC (permalink / raw)
To: musl
[-- 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 --]
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [musl] Re: The `sigpause` function behavior does not fully comply with the POSIX specification
[not found] ` <aEbDlK7qUVEVkTaP@snips.stderr.spb.ru>
@ 2025-06-09 18:15 ` Thorsten Glaser
0 siblings, 0 replies; 2+ messages in thread
From: Thorsten Glaser @ 2025-06-09 18:15 UTC (permalink / raw)
To: musl
On Mon, 9 Jun 2025, Valery Ushakov wrote:
>sigpause is a 4.3BSD interface and it used to be a system call that
>did this:
The thing you missed is that there were two mututally incompatible
sigpause functions around.
The 4.3BSD one is obsolete, but still present in BSD libcs, and
merely resolves to:
int
sigpause(int mask)
{
return (sigsuspend((sigset_t *)&mask));
}
The incompatible *other* one got standardised for UNIX95 and is
the one removed from latest POSIX. I’d even say drop it the next
time musl bumps the major version anyway.
bye,
//mirabilos
--
> Hi, does anyone sell openbsd stickers by themselves and not packaged
> with other products?
No, the only way I've seen them sold is for $40 with a free OpenBSD CD.
-- Haroon Khalid and Steve Shockley in gmane.os.openbsd.misc
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2025-06-09 18:15 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-06-08 8:38 [musl] The `sigpause` function behavior does not fully comply with the POSIX specification Tommy
[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
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).