Re: [RFC] new syscall to allow notification when arbitrary pids die

From: Muli Ben-Yehuda (mulix@mulix.org)
Date: Sat May 10 2003 - 02:38:42 EST


On Sat, May 10, 2003 at 02:29:54AM -0400, Chris Friesen wrote:

> I see two immediate uses for this. One would be to enable a "watcher"
> process which can do useful things on the death of processes which
> registered with it (logging, respawning, notifying other processes,
> etc).

Do it from user space, kill(pid, 0), check for ESRCH. I might see the
benefit of a new system call if it was synchronous (wait() semantics),
but since signal delivery is asynch anyway....

> The second would be to enable mutual
> suicide pacts between processes. (I'm not sure when I would use this, but
> it sounds kind of fun.)

Same thing, kill(pid, 0).

> Anyone have any opinions on this?

There's already a well established way to do what you want (get
non-immediate notification of process death). What benefit would your
approach give?

-- 
Muli Ben-Yehuda
http://www.mulix.org


- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Thu May 15 2003 - 22:00:33 EST