From owner-svn-src-head@FreeBSD.ORG Sun Feb 12 20:49:45 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DFEE11065678; Sun, 12 Feb 2012 20:49:45 +0000 (UTC) (envelope-from andrey@zonov.org) Received: from mail-pw0-f54.google.com (mail-pw0-f54.google.com [209.85.160.54]) by mx1.freebsd.org (Postfix) with ESMTP id A34568FC13; Sun, 12 Feb 2012 20:49:45 +0000 (UTC) Received: by pbcxa7 with SMTP id xa7so3507160pbc.13 for ; Sun, 12 Feb 2012 12:49:45 -0800 (PST) Received: by 10.68.73.103 with SMTP id k7mr39714604pbv.132.1329079314789; Sun, 12 Feb 2012 12:41:54 -0800 (PST) Received: from [10.254.254.77] (ppp95-165-146-120.pppoe.spdop.ru. [95.165.146.120]) by mx.google.com with ESMTPS id w4sm34550485pbf.4.2012.02.12.12.41.50 (version=SSLv3 cipher=OTHER); Sun, 12 Feb 2012 12:41:53 -0800 (PST) Message-ID: <4F38240B.5040507@zonov.org> Date: Mon, 13 Feb 2012 00:41:47 +0400 From: Andrey Zonov User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; ru; rv:1.8.1.24) Gecko/20100228 Thunderbird/2.0.0.24 Mnenhy/0.7.6.0 MIME-Version: 1.0 To: Pawel Jakub Dawidek 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> In-Reply-To: <20120212200253.GC1355@garage.freebsd.pl> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Gm-Message-State: ALoCoQn5AKDjWqjKHiPVUhMaH3zMfCptaZcaeWqJSAN4kcRruv8BWKN++p0tpNKw+8dbqQssBJHT Cc: Mikolaj Golub , Guy Helmer , svn-src-all@FreeBSD.org, svn-src-head@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn commit: r230869 - head/usr.sbin/daemon X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 12 Feb 2012 20:49:46 -0000 On 13.02.2012 0:02, Pawel Jakub Dawidek wrote: > On Sun, Feb 12, 2012 at 09:06:55PM +0200, Mikolaj Golub wrote: >> AZ> Check return code from pidfile_write() function. I saw many times >> AZ> when pid could not be written because of there is not enough free >> AZ> space (but file was created). Unfortunately, I have no suggestions >> AZ> how to handle this properly. >> >> We could return with error in this case (for me this almost the same as if we >> don't create file at all). But if we check pidfile_write() status we should >> resign the pidfile_write() feature that allows to pass NULL pidfh and check if >> pidfile option is used. Something like in this patch: >> >> http://people.freebsd.org/~trociny/daemon/daemon.pidfile_write.1.patch >> >> Not sure I should commit this though. > > Please don't. Even if you can't write the pidfile, you should run the > service. The same as for pidfile_open() failure as documented in > example. Feel free to warn about problem with writing to pidfile, but > don't treat it as critial error. The problem is the following you cannot stop such a service with standard rc.d script and empty pidfile. > > We can also add such a warning to the example in the manual page. > -- Andrey Zonov