Disable exiting upon receiving more then 3 signals, fixes #129

This commit is contained in:
Taner Sener 2021-08-18 23:06:43 +03:00
parent d4f51ca5c0
commit 247a8b2149
2 changed files with 0 additions and 14 deletions

View File

@ -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

View File

@ -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