X-Git-Url: https://ruderich.org/simon/gitweb/?p=ptyas%2Fptyas.git;a=blobdiff_plain;f=ptyas.c;h=d87ae34738e2f8321f6df618b81737db894d4365;hp=9fc7997269a23b756f8a173f399f8bbad771df26;hb=0178c35881746d366a225b932f519f992035f24c;hpb=dad601b98c99c7597d7d6e1df85028d884051a90 diff --git a/ptyas.c b/ptyas.c index 9fc7997..d87ae34 100644 --- 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) {