summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 34f726e)
raw | patch | inline | side by side (parent: 34f726e)
author | Max Kellermann <max@duempel.org> | |
Fri, 3 Oct 2008 13:24:01 +0000 (15:24 +0200) | ||
committer | Max Kellermann <max@duempel.org> | |
Fri, 3 Oct 2008 13:24:01 +0000 (15:24 +0200) |
Don't reset sa_mask and sa_flags after every sigaction() call. Do it
once.
once.
src/main.c | patch | blob | history |
diff --git a/src/main.c b/src/main.c
index 5bb2538f1affddeeefd80a2212887fec3bbb78fd..5c2d0e52ce11973b9086c709290439957ae143db 100644 (file)
--- a/src/main.c
+++ b/src/main.c
}
/* setup signal behavior - SIGTERM */
- sigemptyset(&act.sa_mask);
- act.sa_flags = 0;
+
act.sa_handler = catch_sigint;
if (sigaction(SIGTERM, &act, NULL) < 0) {
perror("sigaction()");
}
/* setup signal behavior - SIGCONT */
- sigemptyset(&act.sa_mask);
- act.sa_flags = 0;
+
act.sa_handler = catch_sigcont;
if (sigaction(SIGCONT, &act, NULL) < 0) {
perror("sigaction(SIGCONT)");
}
/* setup signal behaviour - SIGHUP*/
- sigemptyset(&act.sa_mask);
- act.sa_flags = 0;
+
act.sa_handler = catch_sigint;
if (sigaction(SIGHUP, &act, NULL) < 0) {
perror("sigaction(SIGHUP)");