Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Update 10.11.c
  • Loading branch information
himanshu-17 authored Oct 1, 2019
commit 78cc13493a6f455dfb91e21df130830dc01e743e
8 changes: 4 additions & 4 deletions 10.11.c
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,17 @@ static void sig_quit(int);

int main(void)
{
sigset_t newmask, oldmask, pendmask;
sigset_t newmas, oldmask, pendmask;

if (signal(SIGQUIT, sig_quit) == SIG_ERR) {
printf("can't catch SIGQUIT\n");
exit(-1);
}

sigemptyset(&newmask);
sigaddset(&newmask, SIGQUIT);
sigemptyset(&newmas);
sigaddset(&newmas, SIGQUIT);

if (sigprocmask(SIG_BLOCK, &newmask, &oldmask) < 0) {
if (sigprocmask(SIG_BLOCK, &newmas, &oldmask) < 0) {
printf("SIG_BLOCK error\n");
exit(-1);
}
Expand Down