Re: [RFC PATCH] Minimal non-child process exit notification support

2018-10-31 Thread Daniel Colascione
On Wed, Oct 31, 2018 at 5:25 PM, Andy Lutomirski wrote: > I had an old patch to do much the same thing: It's a perennial idea. :-) > https://lore.kernel.org/patchwork/patch/345098/ > > Can you comment as to how your API compares to my old patch? Sure. Basically, my approach is sort-of eventfd-e

Re: [RFC PATCH] Minimal non-child process exit notification support

2018-10-31 Thread Daniel Colascione
+ linux-api On Mon, Oct 29, 2018 at 5:53 PM, Daniel Colascione wrote: > This patch adds a new file under /proc/pid, /proc/pid/exithand. > Attempting to read from an exithand file will block until the > corresponding process exits, at which point the read will successfully > complete with EOF. Th

Re: [RFC PATCH] Minimal non-child process exit notification support

2018-10-31 Thread Daniel Colascione
On Wed, Oct 31, 2018 at 2:25 PM, David Laight wrote: > From: Daniel Colascione >> Sent: 31 October 2018 12:56 >> On Wed, Oct 31, 2018 at 12:27 PM, David Laight >> wrote: >> > From: Daniel Colascione >> >> Sent: 29 October 2018 17:53 >> >> >> >> This patch adds a new file under /proc/pid, /proc/p

Re: [RFC PATCH] Minimal non-child process exit notification support

2018-10-31 Thread Joel Fernandes
On Wed, Oct 31, 2018 at 7:41 AM, Joel Fernandes wrote: [...] >>> > Indeed, to avoid killing the wrong process you need to have opened >>> > some node of /proc/pid/* (maybe cmdline) before sending the kill >>> > signal. >>> >>> The kernel really needs better documentation of the semantics of >>> pr

Re: [RFC PATCH] Minimal non-child process exit notification support

2018-10-31 Thread Joel Fernandes
On Wed, Oct 31, 2018 at 7:25 AM, David Laight wrote: > From: Daniel Colascione >> Sent: 31 October 2018 12:56 >> On Wed, Oct 31, 2018 at 12:27 PM, David Laight >> wrote: >> > From: Daniel Colascione >> >> Sent: 29 October 2018 17:53 >> >> >> >> This patch adds a new file under /proc/pid, /proc/p

RE: [RFC PATCH] Minimal non-child process exit notification support

2018-10-31 Thread David Laight
From: Daniel Colascione > Sent: 31 October 2018 12:56 > On Wed, Oct 31, 2018 at 12:27 PM, David Laight > wrote: > > From: Daniel Colascione > >> Sent: 29 October 2018 17:53 > >> > >> This patch adds a new file under /proc/pid, /proc/pid/exithand. > >> Attempting to read from an exithand file will

Re: [RFC PATCH] Minimal non-child process exit notification support

2018-10-31 Thread Daniel Colascione
On Wed, Oct 31, 2018 at 12:27 PM, David Laight wrote: > From: Daniel Colascione >> Sent: 29 October 2018 17:53 >> >> This patch adds a new file under /proc/pid, /proc/pid/exithand. >> Attempting to read from an exithand file will block until the >> corresponding process exits, at which point the r

RE: [RFC PATCH] Minimal non-child process exit notification support

2018-10-31 Thread David Laight
From: Daniel Colascione > Sent: 29 October 2018 17:53 > > This patch adds a new file under /proc/pid, /proc/pid/exithand. > Attempting to read from an exithand file will block until the > corresponding process exits, at which point the read will successfully > complete with EOF. The file descript

Re: [RFC PATCH] Minimal non-child process exit notification support

2018-10-30 Thread Joel Fernandes
On Tue, Oct 30, 2018 at 08:59:25AM +, Daniel Colascione wrote: > On Tue, Oct 30, 2018 at 3:06 AM, Joel Fernandes wrote: > > On Mon, Oct 29, 2018 at 1:01 PM Daniel Colascione wrote: > >> > >> Thanks for taking a look. > >> > >> On Mon, Oct 29, 2018 at 7:45 PM, Joel Fernandes wrote: > >> > > >

Re: [RFC PATCH] Minimal non-child process exit notification support

2018-10-30 Thread Daniel Colascione
On Tue, Oct 30, 2018 at 3:06 AM, Joel Fernandes wrote: > On Mon, Oct 29, 2018 at 1:01 PM Daniel Colascione wrote: >> >> Thanks for taking a look. >> >> On Mon, Oct 29, 2018 at 7:45 PM, Joel Fernandes wrote: >> > >> > On Mon, Oct 29, 2018 at 10:53 AM Daniel Colascione >> > wrote: >> > > >> > >

Re: [RFC PATCH] Minimal non-child process exit notification support

2018-10-29 Thread Joel Fernandes
On Mon, Oct 29, 2018 at 1:01 PM Daniel Colascione wrote: > > Thanks for taking a look. > > On Mon, Oct 29, 2018 at 7:45 PM, Joel Fernandes wrote: > > > > On Mon, Oct 29, 2018 at 10:53 AM Daniel Colascione > > wrote: > > > > > > This patch adds a new file under /proc/pid, /proc/pid/exithand. > >

Re: [RFC PATCH] Minimal non-child process exit notification support

2018-10-29 Thread Daniel Colascione
Thanks for taking a look. On Mon, Oct 29, 2018 at 7:45 PM, Joel Fernandes wrote: > > On Mon, Oct 29, 2018 at 10:53 AM Daniel Colascione wrote: > > > > This patch adds a new file under /proc/pid, /proc/pid/exithand. > > Attempting to read from an exithand file will block until the > > correspondi

Re: [RFC PATCH] Minimal non-child process exit notification support

2018-10-29 Thread Joel Fernandes
On Mon, Oct 29, 2018 at 12:45 PM Joel Fernandes wrote: > > On Mon, Oct 29, 2018 at 10:53 AM Daniel Colascione wrote: > > > > This patch adds a new file under /proc/pid, /proc/pid/exithand. > > Attempting to read from an exithand file will block until the > > corresponding process exits, at which

Re: [RFC PATCH] Minimal non-child process exit notification support

2018-10-29 Thread Joel Fernandes
On Mon, Oct 29, 2018 at 10:53 AM Daniel Colascione wrote: > > This patch adds a new file under /proc/pid, /proc/pid/exithand. > Attempting to read from an exithand file will block until the > corresponding process exits, at which point the read will successfully > complete with EOF. The file desc

[RFC PATCH] Minimal non-child process exit notification support

2018-10-29 Thread Daniel Colascione
This patch adds a new file under /proc/pid, /proc/pid/exithand. Attempting to read from an exithand file will block until the corresponding process exits, at which point the read will successfully complete with EOF. The file descriptor supports both blocking operations and poll(2). It's intended t