On Sun, Nov 18, 2018 at 6:47 PM Al Viro <viro@xxxxxxxxxxxxxxxxxx> wrote: > > On Sun, Nov 18, 2018 at 09:42:35AM -0800, Andy Lutomirski wrote: > > > Now here's the kicker: if the "running program" calls execve(), it > > goes away. The fd gets some sort of notification that this happened > > Type error, parser failed. > > Define "fd", please. If it's a "file descriptor", thank you do playing, > you've lost. That's not going to work. If it's "opened file" (aka > "file description" in horrible POSIXese), who's going to get notifications > and what kind of exclusion are you going to use? What I meant was: a program that has one of these fds would be able to find out that an execve() happened and the program needs to refresh its access to the target task. This could be as simple as POLLHUP and, if needed, some syscall indicating exactly why we got POLLHUP (e.g. execve vs exit). There would be some sort of indication that a program that holds an fd pointing at an "opened file" could get -- probably poll() would return some status indicating that execve() happened and our capability is gone, and, if needed