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

Re: [cobalt-users] How do I actually Restart ProFTPd service?



>You need to reload inetd.  Telnet in as admin, su to root and
>run the following.
>
>[root@vidar /root]# kill -HUP `pidof inetd`
>

Wouldn't kill -HUP `cat /var/run/inetd.pid` be more correct ?

pidof is just a link to killall5(8), which is not the safest way to 
kill a process. Suppose some user has a running process with the name 
of inetd (unprobable, but possible), you will send the signal to that 
process too. Even if it is a SIGHUP, it's still a signal sent by 
root.

Highly unprobable, but reading the pid from inetd.pid seems more 
correct to me.

Fabrice Prémel.