Skip to content

Commit

Permalink
Reenable RT signals after custom signal handler is installed
Browse files Browse the repository at this point in the history
  • Loading branch information
greenc-FNAL committed Dec 13, 2023
1 parent af7f44c commit 10dcd5d
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions art/Utilities/UnixSignalHandlers.cc
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ namespace art {

#ifdef __linux__
void
disableRTSigs()
tweakRTSigs_(int how)
{
sigset_t myset;
abort_on_error(sigemptyset(&myset));
Expand All @@ -87,7 +87,7 @@ namespace art {
abort_on_error(sigaddset(&myset, num));
abort_on_error(sigaction(num, &tmpact, nullptr));
}
abort_on_error(pthread_sigmask(SIG_BLOCK, &myset, 0));
abort_on_error(pthread_sigmask(how, &myset, 0));
}
#endif // __linux__

Expand All @@ -105,9 +105,12 @@ namespace art {
sigset_t oldset;
disableAllSigs(&oldset);
#ifdef __linux__
disableRTSigs();
tweakRTSigs_(SIG_BLOCK);
#endif // __linux__
installSig(signum, func);
#ifdef __linux__
tweakRTSigs_(SIG_UNBLOCK);
#endif // __linux__
reenableSigs(&oldset);
}

Expand Down

0 comments on commit 10dcd5d

Please sign in to comment.