zoukankan      html  css  js  c++  java
  • linux重启守护进程kill -HUP pid

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

    kill -HUP pid 

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

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

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

  • 相关阅读:
    性格决定命运
    操作系统课程设计之生产者消费者问题
    Linux 操作系统学习之线程
    OpenCV 显示一幅图片
    对图像每个像素点量化
    css选择器
    极简主义,对逻辑操作符||和&&深度运用的理解
    slice的用法与用量
    简单重置移动端默认样式
    移动端视口格式化备注
  • 原文地址:https://www.cnblogs.com/Yongzhouunknown/p/13037015.html
Copyright © 2011-2022 走看看