Re: [PATCH v2 2/4] exit: support non-blocking pidfds

2020-09-04 Thread Christian Brauner
On Thu, Sep 03, 2020 at 04:56:59PM -0700, Josh Triplett wrote: > On Wed, Sep 02, 2020 at 12:21:28PM +0200, Christian Brauner wrote: > > Passing a non-blocking pidfd to waitid() currently has no effect, i.e. is > > not > > supported. There are users which would like to use waitid() on pidfds that

Re: [PATCH v2 2/4] exit: support non-blocking pidfds

2020-09-03 Thread Josh Triplett
On Wed, Sep 02, 2020 at 12:21:28PM +0200, Christian Brauner wrote: > Passing a non-blocking pidfd to waitid() currently has no effect, i.e. is not > supported. There are users which would like to use waitid() on pidfds that are > O_NONBLOCK and mix it with pidfds that are blocking and both pass

Re: [PATCH v2 2/4] exit: support non-blocking pidfds

2020-09-03 Thread Josh Triplett
On Thu, Sep 03, 2020 at 05:38:47PM +0200, Christian Brauner wrote: > On Thu, Sep 03, 2020 at 04:22:42PM +0200, Oleg Nesterov wrote: > > On 09/02, Christian Brauner wrote: > > > > > > It also makes the API more consistent and uniform. In essence, waitid() is > > > treated like a read on a

Re: [PATCH v2 2/4] exit: support non-blocking pidfds

2020-09-03 Thread Christian Brauner
On Thu, Sep 03, 2020 at 04:22:42PM +0200, Oleg Nesterov wrote: > On 09/02, Christian Brauner wrote: > > > > It also makes the API more consistent and uniform. In essence, waitid() is > > treated like a read on a non-blocking pidfd or a recvmsg() on a non-blocking > > socket. > > With the addition

Re: [PATCH v2 2/4] exit: support non-blocking pidfds

2020-09-03 Thread Oleg Nesterov
On 09/02, Christian Brauner wrote: > > It also makes the API more consistent and uniform. In essence, waitid() is > treated like a read on a non-blocking pidfd or a recvmsg() on a non-blocking > socket. > With the addition of support for non-blocking pidfds we support the same > functionality that

[PATCH v2 2/4] exit: support non-blocking pidfds

2020-09-02 Thread Christian Brauner
Passing a non-blocking pidfd to waitid() currently has no effect, i.e. is not supported. There are users which would like to use waitid() on pidfds that are O_NONBLOCK and mix it with pidfds that are blocking and both pass them to waitid(). The expected behavior is to have waitid() return -EAGAIN