summaryrefslogtreecommitdiff
path: root/usr/src/cmd/stat/iostat
diff options
context:
space:
mode:
Diffstat (limited to 'usr/src/cmd/stat/iostat')
-rw-r--r--usr/src/cmd/stat/iostat/iostat.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/usr/src/cmd/stat/iostat/iostat.c b/usr/src/cmd/stat/iostat/iostat.c
index c26080eed9..0507d21883 100644
--- a/usr/src/cmd/stat/iostat/iostat.c
+++ b/usr/src/cmd/stat/iostat/iostat.c
@@ -18,6 +18,7 @@
*
* CDDL HEADER END
*/
+
/*
* Copyright 2006 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
@@ -1732,10 +1733,16 @@ set_timer(int interval)
itimerspec_t time_struct;
struct sigevent sig_struct;
struct sigaction act;
+ sigset_t sig_set;
bzero(&sig_struct, sizeof (struct sigevent));
bzero(&act, sizeof (struct sigaction));
+ /* Ensure that our signal is unblocked. */
+ (void) sigemptyset(&sig_set);
+ (void) sigaddset(&sig_set, SIGUSR1);
+ (void) sigprocmask(SIG_UNBLOCK, &sig_set, NULL);
+
/* Create timer */
sig_struct.sigev_notify = SIGEV_SIGNAL;
sig_struct.sigev_signo = SIGUSR1;