mirror of
https://github.com/arthenica/ffmpeg-kit.git
synced 2026-05-07 20:22:27 +00:00
Disable exiting upon receiving more then 3 signals, fixes #129
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user