MINOR: haproxy: Add void deinit_and_exit(int)

This helper function calls deinit() and then exit() with the given status.
This commit is contained in:
Tim Duesterhus 2020-06-14 00:37:41 +02:00 committed by Willy Tarreau
parent 8469bed20b
commit 2654055316
2 changed files with 6 additions and 0 deletions

View File

@ -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);

View File

@ -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()