[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20100309131935.GA11467@redhat.com>
Date: Tue, 9 Mar 2010 14:19:35 +0100
From: Oleg Nesterov <oleg@...hat.com>
To: Ray Lee <ray-lk@...rabbit.org>
Cc: Lennart Poettering <mzxreary@...inter.de>,
Roland McGrath <roland@...hat.com>,
Kay Sievers <kay.sievers@...y.org>,
linux-kernel@...r.kernel.org,
Americo Wang <xiyou.wangcong@...il.com>,
James Morris <jmorris@...ei.org>,
KOSAKI Motohiro <kosaki.motohiro@...fujitsu.com>,
Kyle McMartin <kyle@...hat.com>,
Linus Torvalds <torvalds@...ux-foundation.org>,
Michael Kerrisk <mtk.manpages@...glemail.com>
Subject: Re: [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.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists