mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-09-21 22:01:31 +02:00
REORG: mworker: set nbthread=1 for master after fork
After moving master-worker fork into init() and reintroducing it into a switch-case (see the previous commit), it is more appropriate to set nbthread=1 and nbtgroups=1 immediately in the 'case' for the parent process.
This commit is contained in:
parent
ae84f06025
commit
26e53e2e8c
@ -2096,15 +2096,6 @@ static void init(int argc, char **argv)
|
|||||||
LIST_APPEND(&proc_list, &tmproc->list);
|
LIST_APPEND(&proc_list, &tmproc->list);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (global.mode & MODE_MWORKER_WAIT) {
|
|
||||||
/* in exec mode, there's always exactly one thread. Failure to
|
|
||||||
* set these ones now will result in nbthread being detected
|
|
||||||
* automatically.
|
|
||||||
*/
|
|
||||||
global.nbtgroups = 1;
|
|
||||||
global.nbthread = 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* if daemon + mworker: must fork here to let a master process live in
|
/* if daemon + mworker: must fork here to let a master process live in
|
||||||
* background before forking children.
|
* background before forking children.
|
||||||
*/
|
*/
|
||||||
@ -2204,6 +2195,12 @@ static void init(int argc, char **argv)
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
/* in exec mode, there's always exactly one thread. Failure to
|
||||||
|
* set these ones now will result in nbthread being detected
|
||||||
|
* automatically.
|
||||||
|
*/
|
||||||
|
global.nbtgroups = 1;
|
||||||
|
global.nbthread = 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user