From c173a8ad446c9992e6caf718495f09c45d425128 Mon Sep 17 00:00:00 2001 From: Simon Arlott Date: Mon, 25 Apr 2016 22:27:57 +0100 Subject: [PATCH] modules: use exit(EXIT_FAILURE) on failure This will allow service process monitoring to recognise the difference between a shutdown and an error of a -foreground ircd, because only /DIE (or SIGINT) will exit with return code 0. --- ircd/modules.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ircd/modules.c b/ircd/modules.c index f1fa72c6a..2cd59b6b4 100644 --- a/ircd/modules.c +++ b/ircd/modules.c @@ -77,7 +77,7 @@ modules_init(void) if(lt_dlinit()) { ilog(L_MAIN, "lt_dlinit failed"); - exit(0); + exit(EXIT_FAILURE); } /* Add the default paths we look in to the module system --nenolod */ @@ -241,7 +241,7 @@ load_core_modules(bool warn) ilog(L_MAIN, "Error loading core module %s: terminating ircd", core_module_table[i]); - exit(0); + exit(EXIT_FAILURE); } } }