From: Willy Tarreau Date: Tue, 16 Oct 2007 05:44:56 +0000 (+0200) Subject: [BUG] remove condition for exit() under fork() failure X-Git-Tag: v1.3.13~14 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=d680371064dfa23eb6e85791ccfbb150c1a3c294;p=thirdparty%2Fhaproxy.git [BUG] remove condition for exit() under fork() failure This must come from a copy-paste typo: in the unlikely event that fork() would fail, the parent process would only exit(1) if there were old pids. That's non-sense. --- diff --git a/src/haproxy.c b/src/haproxy.c index 4e819a326f..8cce7ebf71 100644 --- a/src/haproxy.c +++ b/src/haproxy.c @@ -976,8 +976,7 @@ int main(int argc, char **argv) ret = fork(); if (ret < 0) { Alert("[%s.main()] Cannot fork.\n", argv[0]); - if (nb_oldpids) - exit(1); /* there has been an error */ + exit(1); /* there has been an error */ } else if (ret == 0) /* child breaks here */ break;