mirror of
https://salsa.debian.org/dskoll/remind.git
synced 2026-04-26 03:00:58 +02:00
Explicitly set sa_flags in sigaction.
This commit is contained in:
@@ -109,6 +109,7 @@ int main(int argc, char *argv[])
|
|||||||
|
|
||||||
act.sa_handler = sigalrm;
|
act.sa_handler = sigalrm;
|
||||||
sigemptyset(&act.sa_mask);
|
sigemptyset(&act.sa_mask);
|
||||||
|
act.sa_flags = SA_RESTART;
|
||||||
if (sigaction(SIGALRM, &act, NULL) < 0) {
|
if (sigaction(SIGALRM, &act, NULL) < 0) {
|
||||||
fprintf(stderr, "%s: sigaction() failed: %s\n",
|
fprintf(stderr, "%s: sigaction() failed: %s\n",
|
||||||
argv[0], strerror(errno));
|
argv[0], strerror(errno));
|
||||||
@@ -116,6 +117,7 @@ int main(int argc, char *argv[])
|
|||||||
}
|
}
|
||||||
|
|
||||||
act.sa_handler = sigxcpu;
|
act.sa_handler = sigxcpu;
|
||||||
|
act.sa_flags = SA_RESTART;
|
||||||
sigemptyset(&act.sa_mask);
|
sigemptyset(&act.sa_mask);
|
||||||
if (sigaction(SIGXCPU, &act, NULL) < 0) {
|
if (sigaction(SIGXCPU, &act, NULL) < 0) {
|
||||||
fprintf(stderr, "%s: sigaction() failed: %s\n",
|
fprintf(stderr, "%s: sigaction() failed: %s\n",
|
||||||
|
|||||||
+2
-1
@@ -359,7 +359,8 @@ void HandleQueuedReminders(void)
|
|||||||
|
|
||||||
if (ShouldFork || Daemon) {
|
if (ShouldFork || Daemon) {
|
||||||
sa.sa_handler = SigIntHandler;
|
sa.sa_handler = SigIntHandler;
|
||||||
sa.sa_flags = 0;
|
sa.sa_flags = SA_RESTART;
|
||||||
|
sigemptyset(&sa.sa_mask);
|
||||||
(void) sigaction(SIGINT, &sa, NULL);
|
(void) sigaction(SIGINT, &sa, NULL);
|
||||||
sa.sa_handler = SigContHandler;
|
sa.sa_handler = SigContHandler;
|
||||||
(void) sigaction(SIGCONT, &sa, NULL);
|
(void) sigaction(SIGCONT, &sa, NULL);
|
||||||
|
|||||||
Reference in New Issue
Block a user