Date: Mon, 01 Dec 2014 14:43:17 -0800 From: Rui Paulo <rpaulo@me.com> To: Konstantin Belousov <kostikbel@gmail.com> Cc: arch@freebsd.org Subject: Re: Process reapers Message-ID: <2BBA8329-C8F4-452D-B6C2-E129FCD6D666@me.com> 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 Dec 1, 2014, at 10:52, Konstantin Belousov <kostikbel@gmail.com> = wrote: >=20 > 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). >=20 > The API is based on the following DragonFlyBSD commit > = http://gitweb.dragonflybsd.org/dragonfly.git/commit/fc3bc2868ad212f3b412ad= 13f0eaa35b3f8d458d > 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. >=20 > 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=3Dprocctl§ion=3D= 2 > for the description of DragonFly interface. >=20 > The feature was requested by bapt, jilles already provided useful > feedback that was incorporated into the patch. >=20 > Please review and comment. One comment I have is that we could rename the variables to something = more meaningful instead of "p1" or "p2". If "p1" is the reaper, we = could call it "p_reaper". -- Rui Paulo
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?2BBA8329-C8F4-452D-B6C2-E129FCD6D666>