From owner-svn-src-all@FreeBSD.ORG Sun Feb 12 21:32:24 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 805281065670; Sun, 12 Feb 2012 21:32:24 +0000 (UTC) (envelope-from to.my.trociny@gmail.com) Received: from mail-bk0-f54.google.com (mail-bk0-f54.google.com [209.85.214.54]) by mx1.freebsd.org (Postfix) with ESMTP id 30ADF8FC0C; Sun, 12 Feb 2012 21:32:23 +0000 (UTC) Received: by bkcjg1 with SMTP id jg1so3865242bkc.13 for ; Sun, 12 Feb 2012 13:32:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=from:to:cc:subject:references:x-comment-to:sender:date:in-reply-to :message-id:user-agent:mime-version:content-type; bh=VjReZXRHGN70AEGbCNzZ7HU5OiOPkyO7OL3KPHzEF8g=; b=d7xfKwsQmeajUHWTkcY4qwDzaPKplFsuOK605HFekFbdU7tMBkzPRBDcGKgy1C79YB FLYKxQl3hF/Ncz/cmb+ATTQ1kVwf/v2/MJgDU1N3s7dXawNLUo1DPWa1A1apl3NziKFU 4lm04bhdT8e/3C4ysoPCQxU1ifq8Mke+Uyybc= Received: by 10.204.152.88 with SMTP id f24mr5846328bkw.31.1329082342266; Sun, 12 Feb 2012 13:32:22 -0800 (PST) Received: from localhost ([95.69.173.122]) by mx.google.com with ESMTPS id ez5sm39498248bkc.15.2012.02.12.13.32.19 (version=TLSv1/SSLv3 cipher=OTHER); Sun, 12 Feb 2012 13:32:21 -0800 (PST) From: Mikolaj Golub To: Jos Backus References: <20120205214647.GI30033@garage.freebsd.pl> <86sjiov29o.fsf@in138.ua3> <20120206082706.GA1324@garage.freebsd.pl> <86wr7zmy8f.fsf@kopusha.home.net> <20120206221742.GA1336@garage.freebsd.pl> <86liodu3me.fsf@in138.ua3> <20120208090600.GA1308@garage.freebsd.pl> <86sjihsln4.fsf@kopusha.home.net> <4F365C10.5050607@zonov.org> <861upz6fcg.fsf@kopusha.home.net> <20120212200253.GC1355@garage.freebsd.pl> <4F38240B.5040507@zonov.org> X-Comment-To: Jos Backus Sender: Mikolaj Golub Date: Sun, 12 Feb 2012 23:32:17 +0200 In-Reply-To: (Jos Backus's message of "Sun, 12 Feb 2012 12:56:58 -0800") Message-ID: <86wr7r4u1q.fsf@kopusha.home.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.3 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: src-committers@freebsd.org, Pawel Jakub Dawidek , Guy Helmer , svn-src-all@freebsd.org, Andrey Zonov , svn-src-head@freebsd.org Subject: Re: svn commit: r230869 - head/usr.sbin/daemon X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 12 Feb 2012 21:32:24 -0000 On Sun, 12 Feb 2012 12:56:58 -0800 Jos Backus wrote: JB> Right. So why not add a Unix socket listener to daemon(8) so the rc.d JB> script can send commands over the socket instead of using the pidfile? JB> This is what supervise/svc let you do today. JB> I don't understand why this solution isn't obvious once you are JB> committed to running daemon(8) for each service anyway. And then you JB> don't need pidfiles because now you have a much better, standard JB> control interface (sending commands to daemon(8) and gathering JB> responses). Why do you think one is committed to running daemon(8) for each service? daemon(8) is for a program that can't daemonize itself and you want an easy way to run it detached from a terminal. And have an easy way to integrate it in rc(8) using rc.subr(8). And rc.subr(8) knows about pidfiles but knows nothing about unix sockets. Although I don't say that the idea to use a socket file for monitoring and control is bad in general. -- Mikolaj Golub