Re: [PATCH v1 1/1] waitid: Add support for waiting for the current process group

2019-08-14 Thread Christian Brauner
On Wed, Aug 14, 2019 at 02:50:12PM +0200, Oleg Nesterov wrote: > On 08/14, Christian Brauner wrote: > > > > On Wed, Aug 14, 2019 at 02:29:10PM +0200, Oleg Nesterov wrote: > > > On 08/14, christian.brau...@ubuntu.com wrote: > > > > > > > > case P_PGID: > > > > type =

Re: [PATCH v1 1/1] waitid: Add support for waiting for the current process group

2019-08-14 Thread Oleg Nesterov
On 08/14, Christian Brauner wrote: > > On Wed, Aug 14, 2019 at 02:29:10PM +0200, Oleg Nesterov wrote: > > On 08/14, christian.brau...@ubuntu.com wrote: > > > > > > case P_PGID: > > > type = PIDTYPE_PGID; > > > - if (upid <= 0) > > > + if (upid < 0) > > >

Re: [PATCH v1 1/1] waitid: Add support for waiting for the current process group

2019-08-14 Thread Christian Brauner
On Wed, Aug 14, 2019 at 02:29:10PM +0200, Oleg Nesterov wrote: > On 08/14, christian.brau...@ubuntu.com wrote: > > > > case P_PGID: > > type = PIDTYPE_PGID; > > - if (upid <= 0) > > + if (upid < 0) > > return -EINVAL; > > + > > + if

Re: [PATCH v1 1/1] waitid: Add support for waiting for the current process group

2019-08-14 Thread Oleg Nesterov
On 08/14, christian.brau...@ubuntu.com wrote: > > case P_PGID: > type = PIDTYPE_PGID; > - if (upid <= 0) > + if (upid < 0) > return -EINVAL; > + > + if (upid == 0) > + pid =

[PATCH v1 1/1] waitid: Add support for waiting for the current process group

2019-08-14 Thread christian . brauner
From: "Eric W. Biederman" It was recently discovered that the linux version of waitid is not a superset of the other wait functions because it does not include support for waiting for the current process group. This has two downsides. An extra system call is needed to get the current process