linux重启守护进程kill -HUP pid

网友投稿 2745 2022-08-30

linux重启守护进程kill -HUP pid

linux重启守护进程kill -HUP pid

linux重启守护进程可以使用-HUP参数来发送hang up挂断信号,系统会重启进程进行复位操作重新读取配置文件

kill

pid 是进程标识。如果想要更改配置而不需停止并重新启动服务,请使用该命令。在对配置文件作必要的更改后,发出该命令以动态更新服务配置。

根据约定,当您发送一个挂起信号(信号 1 或 HUP)时,大多数服务器进程(所有常用的进程)都会进行复位操作并重新加载它们的配置文件。

There are also different signals that can be sent to both kill commands. What signal you send will be determined by what results you want from the kill command. For instance, you can send the HUP (hang up) signal to the kill command, which will effectively restart the process. This is always a wise choice when you need the process to immediately restart (such as in the case of a daemon). You can get a list of all the signals that can be sent to the kill command by issuing kill -l. You’ll find

注:自己编写服务无法使用kill -HUP

-HUP无法生效参考:​​​https://docs.oracle.com/cd/E19253-01/819-7842/fhkpa/index.html​​

版权声明:本文内容由网络用户投稿,版权归原作者所有,本站不拥有其著作权,亦不承担相应法律责任。如果您发现本站中有涉嫌抄袭或描述失实的内容,请联系我们jiasou666@gmail.com 处理,核实后本网站将在24小时内删除侵权内容。

上一篇:负载均衡、分布式、集群理解以及多台服务器代码如何同步(负载均衡集群的三种实现方式)
下一篇:Linux命令--定时运行程序(脚本)--方法/实例
相关文章

 发表评论

暂时没有评论,来抢沙发吧~