[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: is it OK for invoke-rc.d stop not to stop?

 --- Steve Greenland <steveg@moregruel.net> wrote: 
> But the point of accepting -exec for stop is that it prevents killing
> of a random process that happens to have the same PID as a daemon that
> crashed or otherwise didn't clean up its PID file.

The advantage of using --exec along with --pidfile is, as you say,
that if the daemon has crashed and a new process has started with
the same PID then the new process won't be improperly killed.
Using --name instead of --exec (along with --pidfile) provides
similar protection without the disadvantage of failing if the
inode changes.

> It also allows you to kill a daemon that doesn't have a PID file.

When --exec is used without --pidfile, yes.  However that isn't
how --exec is used in /etc/init.d/skeleton, so #244908 stands.
And --name can also be used in this case.

Thomas Hood

Yahoo! Messenger - Communicate instantly..."Ping" 
your friends today! Download Messenger Now 

Reply to: