public inbox for linux-man@vger.kernel.org
 help / color / mirror / Atom feed
* signal(7): should it mention that SIGCHLD is also sent when child is continued?
@ 2025-01-25 18:58 Arkadiusz Drabczyk
  2025-02-02 11:06 ` Alejandro Colomar
  0 siblings, 1 reply; 3+ messages in thread
From: Arkadiusz Drabczyk @ 2025-01-25 18:58 UTC (permalink / raw)
  To: Alejandro Colomar, mtk.manpages; +Cc: linux-man

Currently it says:

> SIGCHLD      P1990      Ign     Child stopped or terminated

It's the definition from POSIX 1990 which is referred here but the
modern POSIX says that it's also sent when child continues
https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/signal.h.html:

> Child process terminated, stopped, or continued.

It's supported on Linux - in sigaction(2) a flag is described that
controls this and it correctly says that it's sent on stop and resume:

> SA_NOCLDSTOP
>
> If signum is SIGCHLD, do not receive notification when child processes
> stop (i.e., when they receive one of SIGSTOP, SIGTSTP, SIGTTIN, or
> SIGTTOU) or resume (i.e., they receive SIGCONT) (see wait(2)).  This
> flag is meaningful only when establishing a handler for SIGCHLD.

The question about wording in signal(7) has been originally asked by a
confused user here
https://unix.stackexchange.com/q/790116/72304. Should it be changed?

-- 
Arkadiusz Drabczyk <arkadiusz@drabczyk.org>

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2025-02-02 12:13 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-01-25 18:58 signal(7): should it mention that SIGCHLD is also sent when child is continued? Arkadiusz Drabczyk
2025-02-02 11:06 ` Alejandro Colomar
2025-02-02 12:12   ` Arkadiusz Drabczyk

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox