svn commit: r230869 - head/usr.sbin/daemon

Pawel Jakub Dawidek pjd at FreeBSD.org
Sun Feb 12 20:04:16 UTC 2012


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.

We can also add such a warning to the example in the manual page.

-- 
Pawel Jakub Dawidek                       http://www.wheelsystems.com
FreeBSD committer                         http://www.FreeBSD.org
Am I Evil? Yes, I Am!                     http://tupytaj.pl
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 196 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/svn-src-head/attachments/20120212/3e8b983e/attachment.pgp


More information about the svn-src-head mailing list