Hi Chris,
On Wed, Jan 24, 2018 at 10:07:03PM +0000, Christopher Lane wrote:
> Ping; this is a safe change to wanr about a confusing source of error when
> you don't quote the arguments to haproxy in a "soft reloading new config a
> lot" type of environment.
>
> On Thu, Dec 7, 2017 at 1:17 PM Chris Lane <[email protected]> wrote:
>
> >
> > 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 doesn't exit so as not to cause failures but will allow
> > trouble-shooting
> > to be faster.
I don't know much what to think about such a change to be honnest. What
valid use case do you have for passing multiple processes as a single
argument after -sf instead of passing a normal list of arguments ?
I suspect you're running a script doing :
haproxy ... -sf "${pid[*]}"
instead of doing :
haproxy ... -sf "${pid[@]}"
or :
haproxy ... -sf ${pid[*]}
Am I wrong ?
Willy