=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/netstat/if.c,v retrieving revision 1.25 retrieving revision 1.26 diff -c -r1.25 -r1.26 *** src/usr.bin/netstat/if.c 2001/08/26 09:42:04 1.25 --- src/usr.bin/netstat/if.c 2001/09/04 23:35:59 1.26 *************** *** 1,4 **** ! /* $OpenBSD: if.c,v 1.25 2001/08/26 09:42:04 brian Exp $ */ /* $NetBSD: if.c,v 1.16.4.2 1996/06/07 21:46:46 thorpej Exp $ */ /* --- 1,4 ---- ! /* $OpenBSD: if.c,v 1.26 2001/09/04 23:35:59 millert Exp $ */ /* $NetBSD: if.c,v 1.16.4.2 1996/06/07 21:46:46 thorpej Exp $ */ /* *************** *** 38,44 **** #if 0 static char sccsid[] = "from: @(#)if.c 8.2 (Berkeley) 2/21/94"; #else ! static char *rcsid = "$OpenBSD: if.c,v 1.25 2001/08/26 09:42:04 brian Exp $"; #endif #endif /* not lint */ --- 38,44 ---- #if 0 static char sccsid[] = "from: @(#)if.c 8.2 (Berkeley) 2/21/94"; #else ! static char *rcsid = "$OpenBSD: if.c,v 1.26 2001/09/04 23:35:59 millert Exp $"; #endif #endif /* not lint */ *************** *** 376,382 **** int ift_dr; /* drops */ } iftot[MAXIF]; ! u_char signalled; /* set if alarm goes off "early" */ /* * Print a running summary of interface statistics. --- 376,382 ---- int ift_dr; /* drops */ } iftot[MAXIF]; ! volatile sig_atomic_t signalled; /* set if alarm goes off "early" */ /* * Print a running summary of interface statistics. *************** *** 395,401 **** register int line; struct iftot *lastif, *sum, *interesting; struct ifnet_head ifhead; /* TAILQ_HEAD */ ! int oldmask; /* * Find the pointer to the first ifnet structure. Replace --- 395,401 ---- register int line; struct iftot *lastif, *sum, *interesting; struct ifnet_head ifhead; /* TAILQ_HEAD */ ! sigset_t emptyset; /* * Find the pointer to the first ifnet structure. Replace *************** *** 552,562 **** putchar('\n'); fflush(stdout); line++; ! oldmask = sigblock(sigmask(SIGALRM)); ! if (! signalled) { ! sigpause(0); ! } ! sigsetmask(oldmask); signalled = NO; (void)alarm(interval); if (line == 21) --- 552,560 ---- putchar('\n'); fflush(stdout); line++; ! sigemptyset(&emptyset); ! if (!signalled) ! sigsuspend(&emptyset); signalled = NO; (void)alarm(interval); if (line == 21)