Usr1 is also usually used to inform the application to reload the configuration file. For example, sending a usr1 signal to the Apache HTTP Server will lead to the following steps: stop accepting new connections and wait until the current connection stops, reload the configuration file, re-open the log file, and restart the server to achieve smooth and non-Shutdown changes.
From wiki:
Http://zh.wikipedia.org/wiki/SIGUSR1%E5%92%8CSIGUSR2
Er, we recently found that usr2 is still available. It seems that both usr1 and usr1 can be customized. It is also taken from the above wiki:
On a POSIX-compatible platform,SIGUSR1AndSigusr2Is a signal sent to a process, which indicates a user-defined situation. Their symbolic constants are defined in the header file signal. h. The signal numbers may change on different platforms, so you need to use the symbol name.
Kill-hup pid or killall-hup pname:
PID indicates the process ID and pname indicates the process name.
If you want to change the configuration without stopping and restarting the service, you can use the preceding two commands. After making necessary changes to the configuration file, issue this command to dynamically update the service configuration.
As agreed, when you send a pending signal (signal 1 or hup), most server processes (all common processes) will reset and reload their configuration files.