Disable exiting upon receiving more then 3 signals, fixes #129
This commit is contained in:
parent
d4f51ca5c0
commit
247a8b2149
|
@ -446,16 +446,9 @@ extern __thread volatile int longjmp_value;
|
|||
static void
|
||||
sigterm_handler(int sig)
|
||||
{
|
||||
int ret;
|
||||
received_sigterm = sig;
|
||||
received_nb_signals++;
|
||||
term_exit_sigsafe();
|
||||
if(received_nb_signals > 3) {
|
||||
ret = write(2/*STDERR_FILENO*/, "Received > 3 system signals, hard exiting\n",
|
||||
strlen("Received > 3 system signals, hard exiting\n"));
|
||||
if (ret < 0) { /* Do nothing */ };
|
||||
exit(123);
|
||||
}
|
||||
}
|
||||
|
||||
#if HAVE_SETCONSOLECTRLHANDLER
|
||||
|
|
|
@ -443,16 +443,9 @@ extern __thread volatile int longjmp_value;
|
|||
static void
|
||||
sigterm_handler(int sig)
|
||||
{
|
||||
int ret;
|
||||
received_sigterm = sig;
|
||||
received_nb_signals++;
|
||||
term_exit_sigsafe();
|
||||
if(received_nb_signals > 3) {
|
||||
ret = write(2/*STDERR_FILENO*/, "Received > 3 system signals, hard exiting\n",
|
||||
strlen("Received > 3 system signals, hard exiting\n"));
|
||||
if (ret < 0) { /* Do nothing */ };
|
||||
exit(123);
|
||||
}
|
||||
}
|
||||
|
||||
#if HAVE_SETCONSOLECTRLHANDLER
|
||||
|
|
Loading…
Reference in New Issue
Block a user