Explicitly set sa_flags in sigaction.

This commit is contained in:
Dianne Skoll
2024-06-06 10:42:04 -04:00
parent b3af44d212
commit e33bf4e80a
2 changed files with 4 additions and 1 deletions
+2
View File
@@ -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",