]> git.kaiwu.me - nginx.git/commitdiff
Merge of r4865: clearing of cpu_affinity after process spawn.
authorMaxim Dounin <mdounin@mdounin.ru>
Mon, 12 Nov 2012 17:54:49 +0000 (17:54 +0000)
committerMaxim Dounin <mdounin@mdounin.ru>
Mon, 12 Nov 2012 17:54:49 +0000 (17:54 +0000)
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

index 0474a26ca725110870816bf3b976be556efa6ed0..4781d9c7152570b90fa3178d7e1ac0b841174542 100644 (file)
@@ -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;
 }