lkml.org 
[lkml]   [2010]   [Mar]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] exit: PR_SET_ANCHOR for marking processes as reapers for child processes
On 03/08, Ray Lee wrote:
>
> The kernel already offers system-wide process exit notification via
> taskstats (a netlink interface), though unfortunately I believe it's
> optional. It's pretty easy to use (as these things go, anyway -- I was
> able to hack up an arbitrary process exit watcher in about a half hour
> based on Documentation/accounting/getdelays.c).

Or proc connector (optional too). Unlike taskstats it notifies about
fork() as well. But, iirc it doesn't allow to filter out the unwanted pids.

Actually, I don't really understand how PR_SET_ANCHOR task can monitor
several daemons. I mean, when the grandchild dies, the sub-init doesn't
know who forked this child during daemonize().


Cough, can't resist... With utrace it would very simple to create the
module which allows to monitor the child's fork/exit/etc with almost
zero overhead, and this overhead only applies to the "traced" tasks.

Oleg.



\
 
 \ /
  Last update: 2010-03-09 14:23    [W:1.328 / U:0.060 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site