Skip to content

Commit 6ccbe29

Browse files
committed
remove signal_handler
1 parent 869f45d commit 6ccbe29

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

src/MEGASync/control/CrashHandler.cpp

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -271,6 +271,18 @@ string getDistroVersion()
271271
write(dump_file, oss.str().c_str(), oss.str().size());
272272
close(dump_file);
273273

274+
struct sigaction sa;
275+
sa.sa_handler = SIG_DFL;
276+
sigemptyset (&sa.sa_mask);
277+
sigaction(SIGSEGV, &sa, NULL);
278+
sigaction(SIGBUS, &sa, NULL);
279+
sigaction(SIGILL, &sa, NULL);
280+
sigaction(SIGFPE, &sa, NULL);
281+
sigaction(SIGABRT, &sa, NULL);
282+
#if defined(__arm64__)
283+
sigaction(SIGTRAP, &sa, NULL);
284+
#endif
285+
274286
CrashHandler::tryReboot();
275287
exit(128+sig);
276288
}

0 commit comments

Comments
 (0)