annotated_nginx
annotated_nginx copied to clipboard
ngx_process_t.respawn 的含义讨论
从代码来看(worker 退出后状态获取和重新拉起逻辑),respawn 的意思应该是”该进程是否应该被重新拉起”
Could you point out the proper code line? Then I will fix it.
worker 进程退出后,master 进程中 ngx_processes 数组对应 pid 位置的 exited 标志置为 1,在 ngx_reap_children 函数中将 exited 为 1 的 worker 进程重新拉起,这时 respawn 代表的含义是 "待拉起进程在 ngx_processes 数组中对应的下标"