From: Tim Duesterhus Date: Sat, 13 Jun 2020 22:37:41 +0000 (+0200) Subject: MINOR: haproxy: Add void deinit_and_exit(int) X-Git-Tag: v2.2-dev10~52 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=2654055316380d4f1d4fff183905a20be9491a2a;p=thirdparty%2Fhaproxy.git MINOR: haproxy: Add void deinit_and_exit(int) This helper function calls deinit() and then exit() with the given status. --- diff --git a/include/haproxy/global.h b/include/haproxy/global.h index 4cf5374030..1028c1b2a5 100644 --- a/include/haproxy/global.h +++ b/include/haproxy/global.h @@ -61,6 +61,7 @@ struct proxy; struct server; int main(int argc, char **argv); void deinit(void); +void deinit_and_exit(int); void run_poll_loop(void); int tell_old_pids(int sig); int delete_oldpid(int pid); diff --git a/src/haproxy.c b/src/haproxy.c index dcde0c100a..2250815b33 100644 --- a/src/haproxy.c +++ b/src/haproxy.c @@ -2865,6 +2865,11 @@ void deinit(void) deinit_pollers(); } /* end deinit() */ +void deinit_and_exit(int status) +{ + deinit(); + exit(status); +} /* Runs the polling loop */ void run_poll_loop()