From 927643e3e9f8162004cc004e70796c95790ce3f6 Mon Sep 17 00:00:00 2001 From: Maxim Dounin Date: Wed, 26 Sep 2012 16:25:12 +0000 Subject: [PATCH] Added clearing of cpu_affinity after process spawn. This fixes unwanted/incorrect cpu_affinity use on dead worker processes respawn. While this is not ideal, it's expected to be better when previous situation where multiple processes were spawn with identical CPU affinity set. Reported by Charles Chen. --- src/os/unix/ngx_process_cycle.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/os/unix/ngx_process_cycle.c b/src/os/unix/ngx_process_cycle.c index 0474a26ca..4781d9c71 100644 --- a/src/os/unix/ngx_process_cycle.c +++ b/src/os/unix/ngx_process_cycle.c @@ -371,6 +371,8 @@ ngx_start_worker_processes(ngx_cycle_t *cycle, ngx_int_t n, ngx_int_t type) ngx_pass_open_channel(cycle, &ch); } + + cpu_affinity = 0; }