Skip to content
Snippets Groups Projects
Commit 5b5295b8 authored by Marcel Loose's avatar Marcel Loose :sunglasses:
Browse files

Task #5395: Reverted commit r27942; it breaks tMPITransfer, which now gets...

Task #5395: Reverted commit r27942; it breaks tMPITransfer, which now gets killed by SIGALRM. Maybe the test needs fixing, though. I cannot judge.
parent 89167cca
No related branches found
No related tags found
No related merge requests found
......@@ -71,9 +71,8 @@ namespace LOFAR
void kill()
{
while (!stopped) {
// Interrupt blocking system calls (most notably, read()),
// possibly multiple in a row.
// Note that the thread will stick around until the end
// interrupt blocking system calls (most notably, read())
// note that the thread will stick around until the end
// of pragma parallel, so the thread id is always valid
// once it has been set.
pthread_t oldid = id;
......@@ -113,16 +112,8 @@ namespace LOFAR
static void init()
{
// We avoid cancellation exception for OpenMP threads.
// Allow signalling them ourselves to cancel blocking syscalls.
struct sigaction sa;
sa.sa_handler = sighandler;
::sigemptyset(&sa.sa_mask);
sa.sa_flags = SA_RESTART;
int err = ::sigaction(SIGHUP, &sa, NULL);
if (err != 0) {
LOG_WARN("Failed to register a handler for SIGHUP: OpenMP threads may not terminate!");
}
signal(SIGHUP, sighandler);
siginterrupt(SIGHUP, 1);
}
private:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment