From 7e0ec6fadbd1b7cc54c7d981241a7b70853c4f39 Mon Sep 17 00:00:00 2001 From: M66B Date: Wed, 25 Oct 2017 21:19:36 +0200 Subject: [PATCH] Remove abort handler --- app/src/main/jni/netguard/session.c | 19 ------------------- 1 file changed, 19 deletions(-) diff --git a/app/src/main/jni/netguard/session.c b/app/src/main/jni/netguard/session.c index 07bb91fa..3f90d5c5 100644 --- a/app/src/main/jni/netguard/session.c +++ b/app/src/main/jni/netguard/session.c @@ -45,15 +45,6 @@ void clear() { ng_session = NULL; } -sighandler_t old_handler; -sigjmp_buf jump; - -void handle_sigabrt(int sig) { - log_android(ANDROID_LOG_ERROR, "sigabrt"); - old_handler(sig); - siglongjmp(jump, 1); -} - void *handle_events(void *a) { struct arguments *args = (struct arguments *) a; log_android(ANDROID_LOG_WARN, "Start events tun=%d thread %x", args->tun, thread_id); @@ -115,17 +106,9 @@ void *handle_events(void *a) { stopping = 1; } - old_handler = signal(SIGABRT, handle_sigabrt); - // Loop long long last_check = 0; while (!stopping) { - if (sigsetjmp(jump, 1)) { - log_android(ANDROID_LOG_WARN, "Continuing after abort"); - if (stopping) - break; - } - log_android(ANDROID_LOG_DEBUG, "Loop thread %x", thread_id); int recheck = 0; @@ -304,8 +287,6 @@ void *handle_events(void *a) { } } - signal(SIGABRT, old_handler); - // Close epoll file if (epoll_fd >= 0 && close(epoll_fd)) log_android(ANDROID_LOG_ERROR,