diff --git a/src/main.c b/src/main.c index 1b90ce83..3f1eabc4 100644 --- a/src/main.c +++ b/src/main.c @@ -109,6 +109,7 @@ int main(int argc, char *argv[]) act.sa_handler = sigalrm; sigemptyset(&act.sa_mask); + act.sa_flags = SA_RESTART; if (sigaction(SIGALRM, &act, NULL) < 0) { fprintf(stderr, "%s: sigaction() failed: %s\n", argv[0], strerror(errno)); @@ -116,6 +117,7 @@ int main(int argc, char *argv[]) } act.sa_handler = sigxcpu; + act.sa_flags = SA_RESTART; sigemptyset(&act.sa_mask); if (sigaction(SIGXCPU, &act, NULL) < 0) { fprintf(stderr, "%s: sigaction() failed: %s\n", diff --git a/src/queue.c b/src/queue.c index a3f96e55..2f0ebc3c 100644 --- a/src/queue.c +++ b/src/queue.c @@ -359,7 +359,8 @@ void HandleQueuedReminders(void) if (ShouldFork || Daemon) { sa.sa_handler = SigIntHandler; - sa.sa_flags = 0; + sa.sa_flags = SA_RESTART; + sigemptyset(&sa.sa_mask); (void) sigaction(SIGINT, &sa, NULL); sa.sa_handler = SigContHandler; (void) sigaction(SIGCONT, &sa, NULL);