nginx
可以通过信号来控制。 master进程的进程ID默认写入文件/usr/local/nginx/logs/nginx.pid
。此名称可以在配置时更改,或者在 nginx.conf 中使用 pid 指令更改。
主进程支持信号:
信号值 |
说明 |
TERM, INT |
fast shutdown(快速关闭) |
QUIT |
graceful shutdown(优雅关闭) |
HUP |
changing configuration, keeping up with a changed time zone (only for FreeBSD and Linux), starting new worker processes with a new configuration, graceful shutdown of old worker processes(更改配置,跟上更改的时区(仅适用于 FreeBSD 和 Linux),使用新配置启动新工作进程,优雅关闭旧工作进程) |
USR1 |
re-opening log files(重新打开日志文件) |
USR2 |
upgrading an executable file(升级可执行文件) |
WINCH |
graceful shutdown of worker processes(优雅关闭工作进程,配合USER2升级) |
工作进程信号:
信号值 |
说明 |
TERM, INT |
fast shutdown |
QUIT |
graceful shutdown |
USR1 |
re-opening log files |
WINCH |
abnormal termination for debugging (requires debug_points to be enabled)(调试异常终止) |