Linux kill usr1

Source: Internet
Author: User

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.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.