Skip to content

Commit

Permalink
properly set up the struct sigaction (#386)
Browse files Browse the repository at this point in the history
  • Loading branch information
GramThanos authored Aug 19, 2023
1 parent 8b6b237 commit 918b111
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/lib/suspend.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ class thread_suspend_handle {
initialize() {
// Set process-wide signal handler
struct sigaction handler;
memset(&handler, '\0', sizeof(handler));
handler.sa_handler = callback;
sigemptyset(&handler.sa_mask);
assert(sigaction(SIGRTMIN, &handler, nullptr) == 0);
Expand Down

0 comments on commit 918b111

Please sign in to comment.