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

  • 相关阅读:
    CSP201412-2:Z字形扫描
    CSP201409-2:画图
    CSP201403-2:窗口
    CSP201312-2:ISBN号码
    CSP201709-1:打酱油
    CSP201703-1:分蛋糕
    CSP201612-1:中间数
    LOAM笔记及A-LOAM源码阅读
    特征值、特征向量与PCA算法
    欧几里得与区域生长算法
  • 原文地址:https://www.cnblogs.com/Yongzhouunknown/p/13037015.html
Copyright © 2011-2022 走看看