Date: Mon, 5 Aug 2013 13:54:20 +0200 From: =?iso-8859-2?Q?Edward_Tomasz_Napiera=B3a?= <trasz@FreeBSD.org> To: Jilles Tjoelker <jilles@stack.nl> Cc: freebsd-arch@freebsd.org Subject: Re: Reliable process tracking Message-ID: <014C9BBF-E651-48B9-9F42-7849BE292B5A@FreeBSD.org> In-Reply-To: <CDFF8851-0883-4D27-851A-36A9585499E6@FreeBSD.org> References: <20130804134658.GC35080@stack.nl> <CDFF8851-0883-4D27-851A-36A9585499E6@FreeBSD.org>
next in thread | previous in thread | raw e-mail | index | archive | help
Wiadomo=B6=E6 napisana przez Edward Tomasz Napiera=B3a = <trasz@FreeBSD.org> w dniu 5 sie 2013, o godz. 13:13: > Wiadomo=B6=E6 napisana przez Jilles Tjoelker <jilles@stack.nl> w dniu = 4 sie 2013, o godz. 15:46: >> When shutting down a service or requesting status, rc.subr currently >> uses a combination of pidfiles and process names. This is fairly but = not >> completely reliable once it is set up correctly (which can take a lot = of >> work and possibly patching the daemon to use pidfile(3) from our >> libutil). It is also incapable of killing multiprocess daemons such = as >> CGI web servers without cooperation of the daemon. >>=20 >> I think what is needed here is a facility that marks a process and = all >> of its descendants. Removing the mark should be a privileged or at = least >> an unusual operation; no unprivileged function specified by POSIX = such >> as setsid() should do this. >=20 > I've actually thought about that when I added setloginclass(2). It's = trivial > to modify rc.subr to use su(8) to set login class for each service. = It should > be trivial to modify pkill(1) and killall(1) to add "-c" option to = kill all processes > in a given login class And here is the patch: http://people.freebsd.org/~trasz/pkill-c.diff
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?014C9BBF-E651-48B9-9F42-7849BE292B5A>