Because the other non-worker processes like cache process is meaningless to involve socketpairs.
And their value of ngx_worker is 0, thus they will occupy the same fd for reading.
for (n = 0; n < lmcf->nfd; n++) {
if (n == ngx_worker) {
fd = lmcf->read_fd[n];
continue;
}
...
Hi.
Take a look, please.
Because the other non-worker processes like cache process is meaningless to involve socketpairs. And their value of ngx_worker is 0, thus they will occupy the same fd for reading.