* 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
* Re: signal(7): should it mention that SIGCHLD is also sent when child is continued?
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
0 siblings, 1 reply; 3+ messages in thread
From: Alejandro Colomar @ 2025-02-02 11:06 UTC (permalink / raw)
To: Arkadiusz Drabczyk; +Cc: mtk.manpages, linux-man
[-- Attachment #1: Type: text/plain, Size: 1374 bytes --]
Hi Arkadiusz,
On Sat, Jan 25, 2025 at 07:58:34PM +0100, Arkadiusz Drabczyk wrote:
> 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?
Yes, we should change the comment in signal(7) to say that a continued
child also generates that signal, and the comment should also mention
the POSIX version where this was introduced. Would you mind sending a
patch?
Thanks!
Alex
--
<https://www.alejandro-colomar.es/>
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: signal(7): should it mention that SIGCHLD is also sent when child is continued?
2025-02-02 11:06 ` Alejandro Colomar
@ 2025-02-02 12:12 ` Arkadiusz Drabczyk
0 siblings, 0 replies; 3+ messages in thread
From: Arkadiusz Drabczyk @ 2025-02-02 12:12 UTC (permalink / raw)
To: Alejandro Colomar; +Cc: mtk.manpages, linux-man
On Sun, Feb 02, 2025 at 12:06:09PM +0100, Alejandro Colomar wrote:
> Yes, we should change the comment in signal(7) to say that a continued
> child also generates that signal, and the comment should also mention
> the POSIX version where this was introduced. Would you mind sending a
> patch?
No, I've just sent a patch.
--
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