tech-userlevel archive

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

Re: system(3) semantics when SIGCHLD is SIG_IGN'd

> Date: Sun, 13 Aug 2023 13:03:09 +0200
> From: Rhialto <>
> On Sat 12 Aug 2023 at 11:58:36 +0000, Taylor R Campbell wrote:
> > Cons:
> > - POSIX doesn't ask system(3) to work when SIGCHLD is set to SIG_IGN
> >   or when it has SA_NOCLDWAIT set, so this code is nonportable anyway;
> I read through
> and it
> seems entirely silent on the matter. How does this mean that system(3)
> is allowed to fail in this situation? Since the state is not mentioned
> as a special case, I expect that it is supposed to work.

Newer versions of POSIX give a sample implementation of system(3)
which fails the same way under these circumstances:

The only thing it does with SIGCHLD is block it temporarily.

Home | Main Index | Thread Index | Old Index