This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: extending wait4(2) or waitid(2) linux syscall
- From: Florian Weimer <fweimer at redhat dot com>
- To: Dave Martin <Dave dot Martin at arm dot com>
- Cc: "Dmitry V. Levin" <ldv at altlinux dot org>, Arnd Bergmann <arnd at arndb dot de>, Albert ARIBAUD <albert dot aribaud at 3adev dot fr>, "H. Peter Anvin" <hpa at zytor dot com>, GNU C Library <libc-alpha at sourceware dot org>, linux-api at vger dot kernel dot org
- Date: Fri, 16 Nov 2018 14:40:49 +0100
- Subject: Re: extending wait4(2) or waitid(2) linux syscall
- References: <20170420152051.568f2050.albert.aribaud@3adev.fr> <20181115140441.GA2171@altlinux.org> <CAK8P3a0Gsqa8WTbALOUchRyEA7E2f3P1f=XQ8nD2xQaemfPpcQ@mail.gmail.com> <20181115153008.GC2171@altlinux.org> <20181116124238.GT3505@e103592.cambridge.arm.com>
* Dave Martin:
> The traditional way would be install a handler for SIGCHLD and
> do a sigsuspend()/pselect()/ppoll(). Then when the suspend() returns,
> you pump the status of any children with wait*(..., WNOHANG).
>
> Does that not work for you for some reason?
Changing signal handlers is not what a library should do because they
are process-global (not even thread-specific).
Thanks,
Florian