Pidfile generated by /usr/sbin/daemon not usable by rc.d script
smithi at nimnet.asn.au
Sun Jun 5 16:36:15 UTC 2016
On Fri, 3 Jun 2016 10:18:53 +0200, Adam Lindberg wrote:
> We are using FreeBSD 10.1 STABLE. We are trying to demonize an Erlang
> program. Erlang itself has support for detaching but cannot write
> pidfiles. Thatÿÿs why weÿÿre trying to use daemon to wrap it.
> My experience is also that read works in all cases without a newline,
> except from inside the rc script. That I cannot explain.
I'm mystified too. Sounds like raising a bug might be your best bet; it
may be come across by someone who knows more or recognises something.
Looking at your sh -ex runs, good and fail, the only thing I wonder
about is whether running it without -e might make any difference ..
although the sourced /etc/rc.subr certainly should be -e safe.
More information about the freebsd-questions