From: Willy Tarreau Date: Wed, 4 Feb 2009 16:05:23 +0000 (+0100) Subject: [BUG] we must not exit if protocol binding only returns a warning X-Git-Tag: v1.3.14.12~5 X-Git-Url: http://git.ipfire.org/gitweb/?a=commitdiff_plain;h=a1b9a08eff7b19cd9ea75fa71014cb0f5da8e954;p=thirdparty%2Fhaproxy.git [BUG] we must not exit if protocol binding only returns a warning Right now, protocol binding cannot return a warning, but when this will happen, we must not exit but just print the warning. (cherry picked from commit 0a3b9d90d3570cb618c7008cd1d7348d48a3868c) (cherry picked from commit 035514abcf6139ff7da2b54f89c17117b6ddf57f) --- diff --git a/src/haproxy.c b/src/haproxy.c index 9b4c2a961c..1dfce4aef0 100644 --- a/src/haproxy.c +++ b/src/haproxy.c @@ -870,7 +870,7 @@ int main(int argc, char **argv) } /* Note: start_proxies() sends an alert when it fails. */ - if (err != ERR_NONE) { + if ((err & ~ERR_WARN) != ERR_NONE) { if (retry != MAX_START_RETRIES && nb_oldpids) tell_old_pids(SIGTTIN); exit(1); @@ -883,7 +883,7 @@ int main(int argc, char **argv) exit(1); } - if (protocol_bind_all() != ERR_NONE) { + if ((protocol_bind_all() & ~ERR_WARN) != ERR_NONE) { Alert("[%s.main()] Some protocols failed to start their listeners! Exiting.\n", argv[0]); protocol_unbind_all(); /* cleanup everything we can */ if (nb_oldpids)