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

Doug McNaught (doug@mcnaught.org)
12 May 2003 09:23:12 -0400


Chris Friesen <cfriesen@nortelnetworks.com> writes:

> Doug McNaught wrote:

> > Rather than a new syscall, what about a magic file or device that you
> > can poll()?
>
> This is definately an option to consider. The problem that I see with
> this is that when you are trying to monitor large numbers of processes
> you have to worry about running out of file descriptors, and select()
> is no longer as happy.

No reason to have one FD per process monitored. Just a single FD, to
which you can write() a control string to to add or remove a process
from the list, and for which read() yields a small data record
describing the process event that just happened. It's a bit plan-9ish
but there's nothing wrong with that...

-Doug
-
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/