0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-09-30 12:48:54 +02:00

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.
This commit is contained in:
Simon Arlott 2016-04-25 22:27:57 +01:00
parent 762468f85d
commit c173a8ad44
No known key found for this signature in database
GPG key ID: C8975F2043CA5D24

View file

@ -77,7 +77,7 @@ modules_init(void)
if(lt_dlinit()) if(lt_dlinit())
{ {
ilog(L_MAIN, "lt_dlinit failed"); ilog(L_MAIN, "lt_dlinit failed");
exit(0); exit(EXIT_FAILURE);
} }
/* Add the default paths we look in to the module system --nenolod */ /* Add the default paths we look in to the module system --nenolod */
@ -241,7 +241,7 @@ load_core_modules(bool warn)
ilog(L_MAIN, ilog(L_MAIN,
"Error loading core module %s: terminating ircd", "Error loading core module %s: terminating ircd",
core_module_table[i]); core_module_table[i]);
exit(0); exit(EXIT_FAILURE);
} }
} }
} }