Date: Tue, 02 Dec 2014 13:34:37 +0800 From: Julian Elischer <julian@freebsd.org> To: freebsd-arch@freebsd.org Subject: Re: [maybe spam] Process reapers Message-ID: <547D4F6D.8070000@freebsd.org> In-Reply-To: <20141201185237.GC97072@kib.kiev.ua> References: <20141201185237.GC97072@kib.kiev.ua>
next in thread | previous in thread | raw e-mail | index | archive | help
On 12/2/14, 2:52 AM, Konstantin Belousov wrote: > Please find at https://www.kib.kiev.ua/kib/reaper.6.patch > the patch which adds a way for the process to declare itself a reaper > for the subtree of processes forked after the event. In other words, > after the process is marked as reaper, all orphaned children somewhere > in subtree after the reaper, are reparented to the process instead of > init(8). > > The API is based on the following DragonFlyBSD commit > http://gitweb.dragonflybsd.org/dragonfly.git/commit/fc3bc2868ad212f3b412ad13f0eaa35b3f8d458d > Linux has somewhat similar prctl(PR_SET_CHILD_SUBREAPER). > Solaris is most advanced in the area, the feature which provides > the same function is contracts(4), which is very advanced and > IMO over-designed interface. > > I did not wrote the man page, the API is still in flux. It should > be relatively clean how to use the thing by the descriptive names > and comments in header file. One of the test programs illustrating > the interface is available at https://www.kib.kiev.ua/kib/reaper2.c . > See http://leaf.dragonflybsd.org/cgi/web-man?command=procctl§ion=2 > for the description of DragonFly interface. > > The feature was requested by bapt, jilles already provided useful > feedback that was incorporated into the patch. > > Please review and comment. I've thought about this for a while for jails. I like the look of it. style/commenting nits only.. (add more comments, ) > _______________________________________________ > freebsd-arch@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-arch > To unsubscribe, send any mail to "freebsd-arch-unsubscribe@freebsd.org" > >
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?547D4F6D.8070000>