linux重启指定进程,linux重启守护进程Kill -HUP

作者:matrix

被围观: 2,837 次

发布时间:2019-04-29

无评论 »

💡NOTICE:这是一个创建于 730 天前的主题,其中的信息可能已经有所发展或是发生改变。

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

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 quite a large number of signals>

usage

指定进程ID 1011:

kill -HUP 1011

使用/var/run查看进程的ID,操作指定进程

kill -HUP `cat /var/run/nginx.pid`

-HUP无法生效参考:

https://docs.oracle.com/cd/E19253-01/819-7842/fhkpa/index.html

参考:

https://www.linux.com/learn/intro-to-Linux/2017/5/how-kill-process-command-line

https://blog.csdn.net/u011350541/article/details/50718085

https://www.cnblogs.com/codingcloud/p/5095066.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值