Skip to content

Commit

Permalink
ngx_worker in 1.9.x
Browse files Browse the repository at this point in the history
  • Loading branch information
chronolaw committed Apr 5, 2016
1 parent 3a0c394 commit 18ba851
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions nginx/src/os/unix/ngx_process_cycle.c
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,9 @@ static void ngx_cache_loader_process_handler(ngx_event_t *ev);
// 一开始是0,也就是NGX_PROCESS_SINGLE
ngx_uint_t ngx_process;

// nginx 1.9.x增加新全局变量ngx_worker,即进程id号
// ngx_uint_t ngx_worker;

// 记录nginx master进程的pid,在main()里使用
ngx_pid_t ngx_pid;

Expand Down Expand Up @@ -859,6 +862,9 @@ ngx_worker_process_cycle(ngx_cycle_t *cycle, void *data)
// 设置进程状态
ngx_process = NGX_PROCESS_WORKER;

// nginx 1.9.x
//ngx_worker = worker;

// 读取核心配置,设置cpu优先级,core dump信息,unix运行的group/user
// 切换工作路径,根据pid设置随机数种子
// 调用所有模块的init_process,让模块进程初始化
Expand Down

0 comments on commit 18ba851

Please sign in to comment.