Skip to content

Commit

Permalink
Catch more signals to cancel measurement and kill childs. Fixes #611
Browse files Browse the repository at this point in the history
  • Loading branch information
TomTheBear committed Sep 12, 2024
1 parent ce0fd89 commit 7bc8062
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/luawid.c
Original file line number Diff line number Diff line change
Expand Up @@ -1733,14 +1733,14 @@ static int lua_likwid_readTemp(lua_State *L) {
static volatile int recv_sigint = 0;

static void signal_catcher(int signo) {
if (signo == SIGINT) {
recv_sigint++;
}
recv_sigint++;
return;
}

static int lua_likwid_catch_signal(lua_State *L) {
signal(SIGINT, signal_catcher);
signal(SIGTERM, signal_catcher);
signal(SIGABRT, signal_catcher);
return 0;
}

Expand Down

0 comments on commit 7bc8062

Please sign in to comment.