BUG/MINOR: init: enforce strict-limits when using master-worker
authorJerome Magnin <jerome@layaute.net>
Tue, 12 Jan 2021 19:19:38 +0000 (20:19 +0100)
committerChristopher Faulet <cfaulet@haproxy.com>
Tue, 26 Jan 2021 11:07:46 +0000 (12:07 +0100)
commit2130da2ecfe911f165879c2c2380ecaccb616c1e
treedc8047a009803520f39d8bb267ac24717ced068e
parent78edc96b1063f00202c25217c14f505b05fbd6a6
BUG/MINOR: init: enforce strict-limits when using master-worker

The strict-limits global option was introduced with commit 0fec3ab7b
("MINOR: init: always fail when setrlimit fails"). When used in
conjuction with master-worker, haproxy will not fail when a setrlimit
fails. This happens because we only exit() if master-worker isn't used.

This patch removes all tests for master-worker mode for all cases covered
by strict-limits scope.

This should be backported from 2.1 onward.
This should fix issue #1042.

Reviewed by William Dauchy <wdauchy@gmail.com>

(cherry picked from commit 50f757c5fdd7e6eb404103d878f648453d00d73e)
Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>
(cherry picked from commit 4b1148f4fe80ee79705b9b56addf15325469c6ca)
Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>
(cherry picked from commit f1deb0aef0dda223951c02cece35f7b785f701cc)
Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>
src/haproxy.c