Kill-hup PID
http://blog.csdn.net/zhuying_linux/article/details/7031573
Kill-hup PID
The PID is the process identity. Use this command if you want to change your configuration without stopping and restarting the service. After making the necessary changes to the configuration file, issue the command to dynamically update the service configuration.
By convention, when you send a pending signal (signal 1 or HUP), most server processes (all common processes) perform a reset operation and reload their configuration files. Listing 2 shows a way to send a pending signal to all running Web server processes.
Listing 2. Tell the WEB server to reload its configuration file and reset the file
[Email protected] [507PSgrepgrep grep,awk'{print $;} ' Xargs 1 sudo Kill -hup
The above command contains a lot of operations, so let's take a closer look at each part of the pipeline. The PS and grep commands are used to search for httpd in all processes (and to ignore the grep process used to search the httpd process). Next, awk displays only the process ID in the output and passes it to Xargs.
The Xargs command then accepts each process ID (because the-l 1 is used to fetch one row at a time) and uses sudo kill-hup to send a pending signal to the appropriate process.
Both Linux and Unix are available:
Change the/etc/ssh/sshd_config, change the port inside to new ports, such as 10022, then Kill-hup ' Cat/var/run/sshd.pid ' on the line.
The existing connection itself will not be broken, because Kill-hup ' cat/var/run/sshd.pid ' is just the one HUP listening, the established connection (different PID) will not break.
vi /etc/ssh/sshd_configkill -hup 'cat /var/run/sshd.pid '
Then you exit under the existing account and log in with the new port.
Ps:
HUP (1) is to let the process hang, sleep;
Kill (9) disowned the dead
Term (15) normal exit process
Because processes may block certain signals, they are also useful.
Kill-hup PID