All of lore.kernel.org
 help / color / mirror / Atom feed
From: Arkadiusz Drabczyk <arkadiusz@drabczyk.org>
To: Alejandro Colomar <alx@kernel.org>, mtk.manpages@gmail.com
Cc: linux-man@vger.kernel.org
Subject: signal(7): should it mention that SIGCHLD is also sent when child is continued?
Date: Sat, 25 Jan 2025 19:58:34 +0100	[thread overview]
Message-ID: <Z5U0Wh_KF3Ki62Pk@comp..> (raw)

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>

             reply	other threads:[~2025-01-25 18:59 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-01-25 18:58 Arkadiusz Drabczyk [this message]
2025-02-02 11:06 ` signal(7): should it mention that SIGCHLD is also sent when child is continued? Alejandro Colomar
2025-02-02 12:12   ` Arkadiusz Drabczyk

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=Z5U0Wh_KF3Ki62Pk@comp.. \
    --to=arkadiusz@drabczyk.org \
    --cc=alx@kernel.org \
    --cc=linux-man@vger.kernel.org \
    --cc=mtk.manpages@gmail.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.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.