Starting service daemons
Natanael Copa
natanael.copa at gmail.com
Tue Mar 27 11:33:41 UTC 2007
On Tue, 2007-03-27 at 13:28 +0200, hinko.kocevar at cetrtapot.si wrote:
> Natanael Copa wrote:
> > On Tue, 2007-03-27 at 09:16 +0200, hinko.kocevar at cetrtapot.si wrote:
> >> Hello,
> >>
> >
> > Use start-stop-daemon -n or with pidfiles.
> >
>
> Ok, thanx.
> I've tried -m -p /var/lock/pidfile and strange thing happens - actual
> PID number recoreded in the pidfile doesn't belong to the daemon being
> started. It belongs to the process that already finished. Eg.
>
> # start-stop-daemon --start -m -p /var/lock/crond.pid -x /sbin/crond --
> -c /etc/crontab/
>
> # ps
> ...
> 4274 root 192 S /sbin/crond -c /etc/crontab/
>
> # cat /var/lock/crond.pid
> 4272
>
> Note: I observed that this doesn't happen with dropbear client but with
> busybox applets - crond, httpd, ...
Its normal. process forks, child continues, parent exits and the pid of
parent get recorded.
try start-stop-daemon -n
Natanael Copa
More information about the busybox
mailing list