Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 04 Aug 2013 20:44:02 -0700
From:      Alfred Perlstein <alfred@freebsd.org>
To:        Jilles Tjoelker <jilles@stack.nl>
Cc:        Tom Rhodes <trhodes@FreeBSD.org>, freebsd-arch@freebsd.org
Subject:   Re: Reliable process tracking
Message-ID:  <51FF1F82.5050100@freebsd.org>
In-Reply-To: <20130804164954.GA37887@stack.nl>
References:  <20130804134658.GC35080@stack.nl> <20130804102708.36341a8a.trhodes@FreeBSD.org> <20130804164954.GA37887@stack.nl>

next in thread | previous in thread | raw e-mail | index | archive | help
On 8/4/13 9:49 AM, Jilles Tjoelker wrote:
> On Sun, Aug 04, 2013 at 10:27:08AM -0400, Tom Rhodes wrote:
>> On Sun, 4 Aug 2013 15:46:58 +0200
>> Jilles Tjoelker <jilles@stack.nl> wrote:
>>> 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.
>>> 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.
>>> [snip]
>>> Similar facilities in other operating systems: Linux cgroups, Solaris
>>> process contracts.
>> There is fscd - it does a lot of what you ask for.  In fact, I had
>> talked to a few people about bringing it into base but have not
>> really figured out how I want to integrate it into rc.
> I think fscd complements reliable process tracking; it does not provide
> it. Fscd relies on rc.d's status, stop and restart to work and therefore
> only works properly if those work properly.
>
Jilles, very exciting you are looking into this.  Have you evaluated 
Linux's "cgroup" facility?  From what I understand, it is a superset of 
your needs, so maybe taking some parts of it may help?

http://en.wikipedia.org/wiki/Cgroups





Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?51FF1F82.5050100>