On Jan 26, 2018 10:39 PM, "Willy Tarreau" <w...@1wt.eu> wrote:

On Fri, Jan 26, 2018 at 11:14:03PM +0000, Christopher Lane wrote:
> > 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 ?
> >
>
> We don't have a use case, we were doing it by mistake and haproxy silently
> misparsed the argument because it is using atoi which is unable to detect
> errors.  The change is to detect and warn about errors.
(...)
> I could have supported the
> multiple PIDs in one argv work as a feature, or make the haproxy fail to
> start, but this change will not make an existing haproxy that starts with
a
> certain behavior change its behavior except the one log msg.

OK, that makes sense indeed. I'd rather fail on parsing errors in this
case rather than trying to fix and recover, to avoid encouraging
deploying such mistakes. This way users who usually don't see warnings
will at least catch the error and possibly fix their faulty script if
required. Those already starting with errors are likely to already face
random issues anyway. Sending a signal to only one pid among many will
cause trouble. Sending a signal to the wrong pid due to a parse error
will cause trouble. So I'm not really considering this a behaviour
change.

Would you care to adapt the patch to simply use strtol() and abort if
an error is returned ?

Thanks,
Willy


Sure.

Reply via email to