Klaus Demo nginx / 72db760
add NGX_PROCESS_HELPER process status Igor Sysoev 12 years ago
9 changed file(s) with 14 addition(s) and 15 deletion(s). Raw diff Collapse all Expand all
633633 #if (NGX_HAVE_UNIX_DOMAIN)
634634
635635 if (ls[i].sockaddr->sa_family == AF_UNIX
636 && ngx_process != NGX_PROCESS_WORKER
636 && ngx_process <= NGX_PROCESS_MASTER
637637 && ngx_new_binary == 0)
638638 {
639639 u_char *name = ls[i].addr_text.data + sizeof("unix:") - 1;
7171 nevents = 0;
7272 }
7373
74 if (ngx_process == NGX_PROCESS_WORKER
74 if (ngx_process >= NGX_PROCESS_WORKER
7575 || cycle->old_cycle == NULL
7676 || cycle->old_cycle->connection_n < cycle->connection_n)
7777 {
8080 nevents = 0;
8181 }
8282
83 if (ngx_process == NGX_PROCESS_WORKER
83 if (ngx_process >= NGX_PROCESS_WORKER
8484 || cycle->old_cycle == NULL
8585 || cycle->old_cycle->connection_n < cycle->connection_n)
8686 {
8181 nevents = 0;
8282 }
8383
84 if (ngx_process == NGX_PROCESS_WORKER
84 if (ngx_process >= NGX_PROCESS_WORKER
8585 || cycle->old_cycle == NULL
8686 || cycle->old_cycle->connection_n < cycle->connection_n)
8787 {
387387 break;
388388
389389 case NGX_PROCESS_WORKER:
390 case NGX_PROCESS_HELPER:
390391 switch (signo) {
391392
392393 case ngx_signal_value(NGX_NOACCEPT_SIGNAL):
713713 ngx_uint_t i;
714714 ngx_connection_t *c;
715715
716 ngx_process = NGX_PROCESS_WORKER;
717
716718 ngx_worker_process_init(cycle, 1);
717719
718720 ngx_setproctitle("worker process");
827829 struct rlimit rlmt;
828830 ngx_core_conf_t *ccf;
829831 ngx_listening_t *ls;
830
831 ngx_process = NGX_PROCESS_WORKER;
832832
833833 if (ngx_set_environment(cycle, NULL) == NULL) {
834834 /* fatal */
12881288
12891289 cycle->connection_n = 512;
12901290
1291 ngx_process = NGX_PROCESS_HELPER;
1292
12911293 ngx_worker_process_init(cycle, 0);
12921294
12931295 ngx_close_listening_sockets(cycle);
2020
2121 #define NGX_PROCESS_SINGLE 0
2222 #define NGX_PROCESS_MASTER 1
23 #define NGX_PROCESS_WORKER 2
24 #define NGX_PROCESS_SIGNALLER 3
23 #define NGX_PROCESS_SIGNALLER 2
24 #define NGX_PROCESS_WORKER 3
25 #define NGX_PROCESS_HELPER 4
2526
2627
2728 typedef struct {
4747 } ngx_exec_ctx_t;
4848
4949
50 #define NGX_PROCESS_SINGLE 0
51 #define NGX_PROCESS_MASTER 1
52 #define NGX_PROCESS_WORKER 2
53
54
5550 ngx_pid_t ngx_spawn_process(ngx_cycle_t *cycle, char *name, ngx_int_t respawn);
5651 ngx_pid_t ngx_execute(ngx_cycle_t *cycle, ngx_exec_ctx_t *ctx);
5752
1313
1414 #define NGX_PROCESS_SINGLE 0
1515 #define NGX_PROCESS_MASTER 1
16 #define NGX_PROCESS_WORKER 2
17 #define NGX_PROCESS_SIGNALLER 3
16 #define NGX_PROCESS_SIGNALLER 2
17 #define NGX_PROCESS_WORKER 3
1818
1919
2020 void ngx_master_process_cycle(ngx_cycle_t *cycle);