Really, what they are talking about is sending a process a signal, called SIGHUP(POSIX hangup), not HUB. The type of signal sent governs what the process will do. As an example, sending the signal SIGHUP to inetd as:
ps -ef | grep inetd
root 873 1 0 07:20 ? 00:00:00 /usr/sbin/inetd
kill -SIGHUP 873
or
kill -1 873
The kill SIGHUP will send a signal of 1 to the process 873, inetd, causing inetd to re-read its configuration file inetd.conf
The default signal for kill is SIGTERM (15), which, when sent, causes a process to gracefully shut itself down. So:
kill 873
and
kill -SIGTERM 873
or
kill -15 873
are really the same command, in that it is send the process 873 (inetd) a number 15 to have it shut itself down. This is the way all commands should be shut down. With this method, the process closes any files it may have open, deallocates any memory used etc.
In the case of
kill -SIGKILL 873
or
kill -9 873
The kernel is directly shutting down the process. This type of kill should only be used if the SIGTERM signal didn't work.
For reference, do a manpage on signal, and do a more on /usr/include/bits/signum.h -mk
|