This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH] sysdeps/wait: Use the waitid syscall if required
- From: Alistair Francis <alistair23 at gmail dot com>
- To: "Dmitry V. Levin" <ldv at altlinux dot org>
- Cc: Alistair Francis <alistair dot francis at wdc dot com>, GNU C Library <libc-alpha at sourceware dot org>
- Date: Wed, 16 Oct 2019 11:17:47 -0700
- Subject: Re: [PATCH] sysdeps/wait: Use the waitid syscall if required
- References: <20190925225514.7224-1-alistair.francis@wdc.com> <20191012122450.GA659@altlinux.org> <CAKmqyKOqFV10nOq0f0JxoXDRqQ-4+08rbGYxMFWtgKe=Bv6Mxg@mail.gmail.com> <20191016173531.GB2848@altlinux.org>
On Wed, Oct 16, 2019 at 10:35 AM Dmitry V. Levin <ldv@altlinux.org> wrote:
>
> On Wed, Oct 16, 2019 at 08:54:08AM -0700, Alistair Francis wrote:
> > On Sat, Oct 12, 2019 at 5:24 AM Dmitry V. Levin wrote:
> > > On Wed, Sep 25, 2019 at 03:55:14PM -0700, Alistair Francis wrote:
> > > > If the waitpid and wait4 syscalls aren't avaliable (such as y2038 safe
> > > > 32-bit systems) let us use the waitid syscall isntead.
> > > >
> > > > Unfortunately waitid is substantially differnt to waitpid and wait4, so
> > > > the conversion ends up being complex.
> > > >
> > > > For full support we need the 5.4+ kernel as that allows a pid of 0 with
> > > > the P_PGID idtype.
> > > >
> > > > 2019-09-16 Alistair Francis <alistair.francis@wdc.com>
> > > >
> > > > * sysdeps/unix/sysv/linux/wait.c: Use the waitid syscall if required.
> > > > * sysdeps/unix/sysv/linux/waitpid.c: Likewise.
> > > > * sysdeps/unix/sysv/linux/waitpid_nocancel.c: Likewise.
> > >
> > > If wait4 is not available, shouldn't it be emulated as well as waitpid?
> >
> > Yes, it is by the changed in wait.c.
>
> This change of wait.c affects __libc_wait only, I don't see how it makes
> wait4 emulated.
I'm not clear on what you mean. Do you mean the direct syscall from
sysdeps/unix/sysv/linux/syscalls.list?
Alistair
>
>
> --
> ldv