void ngx_master_process_cycle(ngx_cycle_t *cycle); void ngx_single_process_cycle(ngx_cycle_t *cycle); |
root 16129 1 0 22:47 ? 00:00:00 nginx: master process /usr/local/nginx/sbin/nginx -c /usr/local/nginx/conf/nginx.conf nobody 16130 16129 0 22:47 ? 00:00:00 nginx: worker process nobody 16131 16129 0 22:47 ? 00:00:00 nginx: worker process nobody 16132 16129 0 22:47 ? 00:00:00 nginx: worker process nobody 16133 16129 0 22:47 ? 00:00:00 nginx: worker process |
# 可以看到 80 端口依然开启 [root@cn ~]# kill -WINCH 16129 [root@cn ~]# netstat -antp | grep nginx tcp 0 0 0.0.0.0:80 0.0.0.0:* LISTEN 16129/nginx.conf [root@cn ~]# ps -ef | grep nginx | grep -v grep root 16129 1 0 22:47 ? 00:00:00 nginx: master process /usr/local/nginx/sbin/nginx -c /usr/local/nginx/conf/nginx.conf [root@cn ~]# # 可以看到 worker 进程又被启动了 [root@cn ~]# kill -HUP 16129 [root@cn ~]# ps -ef | grep nginx | grep -v grep root 16129 1 0 22:47 ? 00:00:00 nginx: master process /usr/local/nginx/sbin/nginx -c /usr/local/nginx/conf/nginx.conf nobody 16321 16129 0 22:57 ? 00:00:00 nginx: worker process nobody 16322 16129 0 22:57 ? 00:00:00 nginx: worker process nobody 16323 16129 0 22:57 ? 00:00:00 nginx: worker process nobody 16324 16129 0 22:57 ? 00:00:00 nginx: worker process [root@cn ~]# |