Skip to content

Commit

Permalink
CRT: handle (ignore) signals USR1 and USR2
Browse files Browse the repository at this point in the history
These should not kill the application.
  • Loading branch information
eworm-de authored and cgzones committed Mar 27, 2024
1 parent 240dd4a commit 1acdf87
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions CRT.c
Original file line number Diff line number Diff line change
Expand Up @@ -965,6 +965,8 @@ static void CRT_installSignalHandlers(void) {
signal(SIGINT, CRT_handleSIGTERM);
signal(SIGTERM, CRT_handleSIGTERM);
signal(SIGQUIT, CRT_handleSIGTERM);
signal(SIGUSR1, SIG_IGN);
signal(SIGUSR2, SIG_IGN);
}

void CRT_resetSignalHandlers(void) {
Expand All @@ -979,6 +981,8 @@ void CRT_resetSignalHandlers(void) {
signal(SIGINT, SIG_DFL);
signal(SIGTERM, SIG_DFL);
signal(SIGQUIT, SIG_DFL);
signal(SIGUSR1, SIG_DFL);
signal(SIGUSR2, SIG_DFL);
}

#ifdef HAVE_GETMOUSE
Expand Down

0 comments on commit 1acdf87

Please sign in to comment.