Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 1 Jun 2016 22:58:28 +1000 (EST)
From:      Ian Smith <smithi@nimnet.asn.au>
To:        Adam Lindberg <adam.lindberg@wooga.net>
Cc:        RW <rwmaillists@googlemail.com>, freebsd-questions@freebsd.org
Subject:   Re: Pidfile generated by /usr/sbin/daemon not usable by rc.d script
Message-ID:  <20160601222416.Q15883@sola.nimnet.asn.au>
In-Reply-To: <6ECB89F6-4410-47D2-AA9B-1EA63B334CF0@wooga.net>
References:  <mailman.4774.1464215826.64914.freebsd-questions@freebsd.org> <20160526193917.C15883@sola.nimnet.asn.au> <6ECB89F6-4410-47D2-AA9B-1EA63B334CF0@wooga.net>

next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, 1 Jun 2016 12:13:27 +0200, Adam Lindberg wrote:
 > Sorry for the late reply.
 > 
 > What we observed was that the `read _pid _junk < $_pidfile` line did 
 > indeed work on the command line, after sourcing /etc/rc.subr. For 
 > some strange reason it seems not to work from inside the service 
 > script for us.

I just had another look at your foo.rcscript attachment, and bounced 
through all in {/usr/local,}/etc/rc.d for examples.  As RW said earlier, 
'command=yes' appears unlike all the others, in that it does not provide 
the full pathname of the executable.  I don't know if that matters here.

Also, none of the others (here) need daemon(8) to run, in background or 
otherwise .. are you sure that you require its functionality for 'foo'?

For one thing, it seems that daemon keeps the -p pidfile locked during 
execution of the process; might that affect service status, stop, etc?

Otherwise I have no idea; a PR may indeed be worthwhile pursuing.

cheers, Ian



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