]> ruderich.org/simon Gitweb - ptyas/ptyas.git/blobdiff - ptyas.c
Rename variable/error message for more sigaction() callers
[ptyas/ptyas.git] / ptyas.c
diff --git a/ptyas.c b/ptyas.c
index 9fc7997269a23b756f8a173f399f8bbad771df26..d87ae34738e2f8321f6df618b81737db894d4365 100644 (file)
--- a/ptyas.c
+++ b/ptyas.c
@@ -425,11 +425,12 @@ int main(int argc, char **argv) {
     close_or_die(pty_slave);
 
     pid_to_wait_for = pid;
-    struct sigaction action = {
+    struct sigaction action_sigchld = {
         .sa_handler = sigchld_handler,
     };
-    if (sigaction(SIGCHLD, &action, NULL) != 0) {
-        die("sigaction");
+    sigemptyset(&action_sigchld.sa_mask);
+    if (sigaction(SIGCHLD, &action_sigchld, NULL) != 0) {
+        die("sigaction SIGCHLD");
     }
 
     if (sigprocmask(SIG_SETMASK, &sigset_old, NULL) != 0) {