]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MINOR: init: emit warning when -sf/-sd cannot parse argument
authorChris Lane <chris@disputingtaste.com>
Mon, 5 Feb 2018 23:15:44 +0000 (23:15 +0000)
committerWilly Tarreau <w@1wt.eu>
Tue, 6 Feb 2018 06:23:32 +0000 (07:23 +0100)
commit236062f7cea355bae9bbb6f5cd1953e78f36c6d8
treef9630cea1fbae276131bf24a6fcaa1ed43f7e697
parent7d58b4d156fe159775e240a73aaad1bb76075af5
MINOR: init: emit warning when -sf/-sd cannot parse argument

Previously, -sf and -sd command line parsing used atol which cannot
detect errors.  I had a problem where I was doing -sf "$pid1 $pid2 $pid"
and it was sending the gracefully terminate signal only to the first pid.
The change uses strtol and checks endptr and errno to see if the parsing
worked.  It will exit when the pid list is not parsed.

[wt: this should be backported to 1.8]
src/haproxy.c