Re: signal(7): should it mention that SIGCHLD is also sent when child is continued?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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: signature.asc
Description: PGP signature


[Index of Archives]     [Kernel Documentation]     [Netdev]     [Linux Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux