BUG/MINOR: startup: haproxy -s cause 100% cpu
authorWilliam Lallemand <wlallemand@haproxy.org>
Wed, 2 Sep 2020 14:12:23 +0000 (16:12 +0200)
committerChristopher Faulet <cfaulet@haproxy.com>
Mon, 7 Sep 2020 07:31:42 +0000 (09:31 +0200)
commit73ffd47a0c8ee98b67a9d6416321dc6819c3b818
tree84cb7f82f7148e140427caf2626f506820746653
parentf6c1bf87063c22eb5d9ca9937f161c22975ef8ca
BUG/MINOR: startup: haproxy -s cause 100% cpu

It was reported in bug #837 that haproxy -s causes a 100% CPU.

However this option does not exist and haproxy must exit with the
usage message.

The parser was not handling the case where -s is not followed by 't' or
'f' which are the only two valid cases.

This bug was introduced by df6c5a ("BUG/MEDIUM: mworker: fix the copy of
options in copy_argv()") which was backported as far as 1.8.

This fix must be backported as far as 1.8.

(cherry picked from commit 398da62c38014c76006571e0caa52a3799f41815)
Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>
(cherry picked from commit 93dec6abdbb23501802f988f95de717feb8d8a8d)
Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>
src/haproxy.c