Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 25 May 2016 20:26:56 +0100
From:      RW <rwmaillists@googlemail.com>
To:        freebsd-questions@freebsd.org
Subject:   Re: Pidfile generated by /usr/sbin/daemon not usable by rc.d script
Message-ID:  <20160525202656.71f51c86@gumby.homeunix.com>
In-Reply-To: <E4F4D59F-1CA0-4A4C-9E76-4ADD988993CC@wooga.net>
References:  <1249E74D-FB34-4FF3-B670-38D80B1B07AF@wooga.net> <20160525141347.7e82622e@gumby.homeunix.com> <20160525142724.7ccadc4e@gumby.homeunix.com> <E4F4D59F-1CA0-4A4C-9E76-4ADD988993CC@wooga.net>

next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, 25 May 2016 17:12:36 +0200
Adam Lindberg wrote:

> Hi,
>=20
> I don=E2=80=99t know what powerd is and how it factors into this. :-)

It's an example of a daemon that generates a pid file without a
newline, and yet "stop" and "status" work.

It turns out that /etc/rc.d/powerd doesn't define pidfile, in which
case rc.subr finds the pid from the output of ps. So it's not a
counter-example and it does appear to be a bug that rc.subr can't cope
with a pid file without a newline.

You could use the same method, but using sed seems safer.



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