Re: named & rndc

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



On Sat, Sep 22, 2007 at 09:44:20AM -0400, Peter Arremann wrote:
> Because restart executes stop and then start. Even if the process has been 
> killed, there may be other things like lock files, shared memory segments and 
> so on around that will be properly removed by stop. Therefore using restart 
> instead of start is a correct and good practice. 

No.

Depending on the rc script it _might_ be safe. In other cases it could
be insanely dangerous.  Take, for example, the following "stop" code...

   kill -9 `cat /var/run/myapp.pid`

What if "myapp" has died but left the pid file behind?  Another process
could have that process ID.  You've now killed some innocent defenseless
program.

(oh look... /etc/init.d/pcmcia...)

So... your procedure is _probably_ safe, there's no way it can be called
"good practice" and definitely not "correct".

-- 

rgds
Stephen
_______________________________________________
CentOS mailing list
CentOS@xxxxxxxxxx
http://lists.centos.org/mailman/listinfo/centos

[Index of Archives]     [CentOS]     [CentOS Announce]     [CentOS Development]     [CentOS ARM Devel]     [CentOS Docs]     [CentOS Virtualization]     [Carrier Grade Linux]     [Linux Media]     [Asterisk]     [DCCP]     [Netdev]     [Xorg]     [Linux USB]
  Powered by Linux