mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-08-31 14:35:26 +00:00
Use _exit() in the fatal() function
Since the fatal() isn't a correct but rather abrupt termination of the program, we want to skip the various atexit() calls because not all memory might be freed during fatal() call, etc. Using _exit() instead of exit() has this effect - the program will end, but no destructors or atexit routines will be called.
This commit is contained in:
@@ -194,7 +194,7 @@ named_main_earlyfatal(const char *format, ...) {
|
||||
}
|
||||
va_end(args);
|
||||
|
||||
exit(1);
|
||||
_exit(EXIT_FAILURE);
|
||||
}
|
||||
|
||||
noreturn static void
|
||||
@@ -233,7 +233,7 @@ assertion_failed(const char *file, int line, isc_assertiontype_t type,
|
||||
if (named_g_coreok) {
|
||||
abort();
|
||||
}
|
||||
exit(1);
|
||||
_exit(EXIT_FAILURE);
|
||||
}
|
||||
|
||||
noreturn static void
|
||||
@@ -273,7 +273,7 @@ library_fatal_error(const char *file, int line, const char *func,
|
||||
if (named_g_coreok) {
|
||||
abort();
|
||||
}
|
||||
exit(1);
|
||||
_exit(EXIT_FAILURE);
|
||||
}
|
||||
|
||||
static void
|
||||
|
Reference in New Issue
Block a user