Actually initialize sa_mask properly
authorSteven Luo <steven+maemo@steven676.net>
Sun, 13 Dec 2009 08:35:18 +0000 (00:35 -0800)
committerSteven Luo <steven+maemo@steven676.net>
Sun, 13 Dec 2009 08:35:18 +0000 (00:35 -0800)
sigset_t isn't necessarily an integer, so we can't assign an integer to
it -- use the appropriate function instead.

main.c

diff --git a/main.c b/main.c
index a366fe7..73ca570 100644 (file)
--- a/main.c
+++ b/main.c
@@ -169,7 +169,7 @@ int main() {
        if (ctx.continuous_mode) {
                struct sigaction act;
                act.sa_flags = SA_RESTART;
-               act.sa_mask = 0;
+               sigemptyset(&(act.sa_mask));
 
                act.sa_handler = waitforzombies;
                if (sigaction(SIGCHLD, &act, NULL) == -1) {