Add 2 seconds for messages to be output before _Exit() on die() to allow messages to be output...

This commit is contained in:
Mike Brady
2026-07-13 08:01:15 +01:00
parent 2ba3b1163a
commit 0adbe5fc72
+2
View File
@@ -24,6 +24,7 @@ SOFTWARE.
#include "debug.h"
#include <ctype.h> // for isprint()
#include <unistd.h> // for usleep()
#include <inttypes.h>
#include <pthread.h>
#include <stdarg.h>
@@ -143,6 +144,7 @@ void _die(const char *filename, const int linenumber, const char *format, ...) {
// syslog(LOG_ERR, "%s", b);
fprintf(stderr, "%s\n", b);
pthread_setcancelstate(oldState, NULL);
usleep(2000000); //allow some time for printing of message
_Exit(EXIT_FAILURE);
}