Add 2 seconds for messages to be output before _Exit() on die() to allow messages to be output...
This commit is contained in:
@@ -24,6 +24,7 @@ SOFTWARE.
|
|||||||
|
|
||||||
#include "debug.h"
|
#include "debug.h"
|
||||||
#include <ctype.h> // for isprint()
|
#include <ctype.h> // for isprint()
|
||||||
|
#include <unistd.h> // for usleep()
|
||||||
#include <inttypes.h>
|
#include <inttypes.h>
|
||||||
#include <pthread.h>
|
#include <pthread.h>
|
||||||
#include <stdarg.h>
|
#include <stdarg.h>
|
||||||
@@ -143,6 +144,7 @@ void _die(const char *filename, const int linenumber, const char *format, ...) {
|
|||||||
// syslog(LOG_ERR, "%s", b);
|
// syslog(LOG_ERR, "%s", b);
|
||||||
fprintf(stderr, "%s\n", b);
|
fprintf(stderr, "%s\n", b);
|
||||||
pthread_setcancelstate(oldState, NULL);
|
pthread_setcancelstate(oldState, NULL);
|
||||||
|
usleep(2000000); //allow some time for printing of message
|
||||||
_Exit(EXIT_FAILURE);
|
_Exit(EXIT_FAILURE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user