linux重启守护进程Kill -HUP

作者:matrix 被围观: 6,498 次 发布时间:2019-04-29 分类:Linux | 一条评论 »

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

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

其他文章:
本文固定链接:https://www.hhtjim.com/linux-restart-daemon-kill-hup.html
matrix
本文章由 matrix 于2019年04月29日发布在Linux分类下,目前没有通告,你可以至底部留下评论。
转载请注明:linux重启守护进程Kill -HUP-HHTjim'S 部落格
关键字:,

有1条评论 »

  1. 自媒体运营 自媒体运营 2021-12-7 12:04:10 +0800#1

    不错,必须顶一下!

添加新评论 »

 🙈 😱 😂 😛 😭 😳 😀 😆 👿 😉 😯 😮 😕 😎 😐 😥 😡 😈 💡

插入图片

NOTICE: You should type some Chinese word (like “你好”) in your comment to pass the spam-check, thanks for your patience!