From owner-freebsd-arch@FreeBSD.ORG Mon Aug 5 10:49:55 2013 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 9AAEA9AF; Mon, 5 Aug 2013 10:49:55 +0000 (UTC) (envelope-from etnapierala@gmail.com) Received: from mail-ee0-x22d.google.com (mail-ee0-x22d.google.com [IPv6:2a00:1450:4013:c00::22d]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id D0E152474; Mon, 5 Aug 2013 10:49:54 +0000 (UTC) Received: by mail-ee0-f45.google.com with SMTP id c50so1543708eek.4 for ; Mon, 05 Aug 2013 03:49:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:content-type:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to:x-mailer; bh=HoKkMFwZVoJZDvBP/+q5zEdmFCZD/m/BaoGI3CHureA=; b=USroDzI/HDnRhCnkCz8lw8uQimxIB8+f9HO7nH6HiWIKQIpSjgylbQ/zQmFA5VW7uI o/MiYCnQzkUYhGQNsR3uz43flYf66PLtrhZRkDF4kKASPIjVeyL9zrtRw0IVTU/t9Wsd 1CybmXxiYJoeYc5s9u8T88uRgpOooNI+lNosoHcAzbOBR5hUWT2nHRKgujWzOSFBm8rc US+Mpoo3mz3+GhCBJha1PeGhxhgtA4DAwhWtFAYj9pi6Ntc86Td5ytR/IwBKcbsam10R 7bLxPZfyCh+rzaEcr9C7XrVSj4kKG430viAwC/Jjy8qsqYWN8NiWcUDBR7gYi4g6TUvF eFPA== X-Received: by 10.15.41.77 with SMTP id r53mr16335074eev.64.1375699793075; Mon, 05 Aug 2013 03:49:53 -0700 (PDT) Received: from [192.168.1.4] (aac168.neoplus.adsl.tpnet.pl. [83.25.2.168]) by mx.google.com with ESMTPSA id bn13sm2721029eeb.11.2013.08.05.03.49.51 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 05 Aug 2013 03:49:52 -0700 (PDT) Sender: =?UTF-8?Q?Edward_Tomasz_Napiera=C5=82a?= Content-Type: text/plain; charset=iso-8859-2 Mime-Version: 1.0 (Mac OS X Mail 6.5 \(1508\)) Subject: Re: Reliable process tracking From: =?iso-8859-2?Q?Edward_Tomasz_Napiera=B3a?= In-Reply-To: <51FF1F82.5050100@freebsd.org> Date: Mon, 5 Aug 2013 12:49:50 +0200 Content-Transfer-Encoding: quoted-printable Message-Id: <6B52B01A-5CEC-41BC-9B59-57BD46CAE9B2@FreeBSD.org> References: <20130804134658.GC35080@stack.nl> <20130804102708.36341a8a.trhodes@FreeBSD.org> <20130804164954.GA37887@stack.nl> <51FF1F82.5050100@freebsd.org> To: Alfred Perlstein X-Mailer: Apple Mail (2.1508) Cc: Tom Rhodes , Jilles Tjoelker , freebsd-arch@freebsd.org X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Aug 2013 10:49:55 -0000 Wiadomo=B6=E6 napisana przez Alfred Perlstein w = dniu 5 sie 2013, o godz. 05:44: > 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 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. >>=20 > Jilles, very exciting you are looking into this. Have you evaluated = Linux's "cgroup" facility? =46rom what I understand, it is a superset = of your needs, so maybe taking some parts of it may help? The good parts of cgroups were already implemented as setloginclass(2) = :-)