From 989668d1f162569b13e258ab8256f38cfeb7d493 Mon Sep 17 00:00:00 2001 From: VAIBHAV-25 <55956316+VAIBHAV-25@users.noreply.github.com> Date: Tue, 1 Oct 2019 20:16:10 +0530 Subject: [PATCH] Update 10.11.c --- 10.11.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/10.11.c b/10.11.c index 3f00212..5eb1168 100644 --- a/10.11.c +++ b/10.11.c @@ -9,7 +9,7 @@ int main(void) sigset_t newmask, oldmask, pendmask; if (signal(SIGQUIT, sig_quit) == SIG_ERR) { - printf("can't catch SIGQUIT\n"); + printf("... can't catch SIGQUIT...\n"); exit(-1); } @@ -17,28 +17,28 @@ int main(void) sigaddset(&newmask, SIGQUIT); if (sigprocmask(SIG_BLOCK, &newmask, &oldmask) < 0) { - printf("SIG_BLOCK error\n"); + printf("... SIG_BLOCK error...\n"); exit(-1); } sleep(5); if (sigpending(&pendmask) < 0) { - printf("sigpending error\n"); + printf("...sigpending error...\n"); exit(-1); } if (sigismember(&pendmask, SIGQUIT)) { - printf("\nSIGQUIT pending\n"); + printf("\n...SIGQUIT pending...\n"); exit(-1); } if (sigprocmask(SIG_SETMASK, &oldmask, NULL) < 0) { - printf("SIG_SETMASK error\n"); + printf("...SIG_SETMASK error...\n"); exit(-1); } - printf("SIGQUIT unblocked\n"); + printf("...SIGQUIT unblocked...\n"); sleep(5); @@ -49,7 +49,7 @@ static void sig_quit(int signo) { printf("caught SIGQUIT\n"); if (signal(SIGQUIT, SIG_DFL) == SIG_ERR) { - printf("can't reset SIGQUIT"); + printf("...can't reset SIGQUIT..."); exit(-1); } }