Remove abort handler

This commit is contained in:
M66B 2017-10-25 21:19:36 +02:00
parent 39b09f731d
commit 7e0ec6fadb
1 changed files with 0 additions and 19 deletions

View File

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