From d680371064dfa23eb6e85791ccfbb150c1a3c294 Mon Sep 17 00:00:00 2001 From: Willy Tarreau Date: Tue, 16 Oct 2007 07:44:56 +0200 Subject: [PATCH] [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. --- src/haproxy.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/haproxy.c b/src/haproxy.c index 4e819a326..8cce7ebf7 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;