diff options
Diffstat (limited to 'src/Compositor.cpp')
-rw-r--r-- | src/Compositor.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/Compositor.cpp b/src/Compositor.cpp index c627fe72..17786cb2 100644 --- a/src/Compositor.cpp +++ b/src/Compositor.cpp @@ -36,6 +36,14 @@ void handleUnrecoverableSignal(int sig) { return; } + // Kill the program if the crash-reporter is caught in a deadlock. + signal(SIGALRM, [](int _) { + char const* msg = "\nCrashReporter exceeded timeout, forcefully exiting\n"; + write(2, msg, strlen(msg)); + abort(); + }); + alarm(15); + CrashReporter::createAndSaveCrash(sig); abort(); |