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 ...@@ -71,9 +71,8 @@ namespace LOFAR
void kill() void kill()
{ {
while (!stopped) { while (!stopped) {
// Interrupt blocking system calls (most notably, read()), // interrupt blocking system calls (most notably, read())
// possibly multiple in a row. // note that the thread will stick around until the end
// Note that the thread will stick around until the end
// of pragma parallel, so the thread id is always valid // of pragma parallel, so the thread id is always valid
// once it has been set. // once it has been set.
pthread_t oldid = id; pthread_t oldid = id;
...@@ -113,16 +112,8 @@ namespace LOFAR ...@@ -113,16 +112,8 @@ namespace LOFAR
static void init() static void init()
{ {
// We avoid cancellation exception for OpenMP threads. signal(SIGHUP, sighandler);
// Allow signalling them ourselves to cancel blocking syscalls. siginterrupt(SIGHUP, 1);
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!");
}
} }
private: private:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment