annotated_nginx icon indicating copy to clipboard operation
annotated_nginx copied to clipboard

ngx_process_t.respawn 的含义讨论

Open vacing opened this issue 1 year ago • 2 comments

从代码来看(worker 退出后状态获取和重新拉起逻辑),respawn 的意思应该是”该进程是否应该被重新拉起”

vacing avatar Feb 06 '24 03:02 vacing

Could you point out the proper code line? Then I will fix it.

chronolaw avatar Apr 24 '24 03:04 chronolaw

worker 进程退出后,master 进程中 ngx_processes 数组对应 pid 位置的 exited 标志置为 1,在 ngx_reap_children 函数中将 exited 为 1 的 worker 进程重新拉起,这时 respawn 代表的含义是 "待拉起进程在 ngx_processes 数组中对应的下标"

xukeawsl avatar May 08 '24 13:05 xukeawsl