Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 12 Feb 2012 21:02:53 +0100
From:      Pawel Jakub Dawidek <pjd@FreeBSD.org>
To:        Mikolaj Golub <trociny@freebsd.org>
Cc:        svn-src-head@FreeBSD.org, Guy Helmer <ghelmer@palisadesystems.com>, svn-src-all@FreeBSD.org, Andrey Zonov <andrey@zonov.org>, src-committers@FreeBSD.org
Subject:   Re: svn commit: r230869 - head/usr.sbin/daemon
Message-ID:  <20120212200253.GC1355@garage.freebsd.pl>
In-Reply-To: <861upz6fcg.fsf@kopusha.home.net>
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>

next in thread | previous in thread | raw e-mail | index | archive | help

--ctP54qlpMx3WjD+/
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

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.
>=20
> We could return with error in this case (for me this almost the same as i=
f we
> don't create file at all). But if we check pidfile_write() status we shou=
ld
> resign the pidfile_write() feature that allows to pass NULL pidfh and che=
ck if
> pidfile option is used. Something like in this patch:
>=20
> http://people.freebsd.org/~trociny/daemon/daemon.pidfile_write.1.patch
>=20
> 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.

--=20
Pawel Jakub Dawidek                       http://www.wheelsystems.com
FreeBSD committer                         http://www.FreeBSD.org
Am I Evil? Yes, I Am!                     http://tupytaj.pl

--ctP54qlpMx3WjD+/
Content-Type: application/pgp-signature

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.18 (FreeBSD)

iEYEARECAAYFAk84Gu0ACgkQForvXbEpPzS2ZwCfbUTLJTsB/Fw+k2x2BkoFORC4
WyMAn3+qZ7yh/iYGFvpGYO1CzRAqdvhq
=eHFr
-----END PGP SIGNATURE-----

--ctP54qlpMx3WjD+/--



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