[BACK]Return to if.c CVS log [TXT][DIR] Up to [local] / src / usr.bin / netstat

Diff for /src/usr.bin/netstat/if.c between version 1.25 and 1.26

version 1.25, 2001/08/26 09:42:04 version 1.26, 2001/09/04 23:35:59
Line 376 
Line 376 
         int     ift_dr;                 /* drops */          int     ift_dr;                 /* drops */
 } iftot[MAXIF];  } iftot[MAXIF];
   
 u_char  signalled;                      /* set if alarm goes off "early" */  volatile sig_atomic_t signalled;        /* set if alarm goes off "early" */
   
 /*  /*
  * Print a running summary of interface statistics.   * Print a running summary of interface statistics.
Line 395 
Line 395 
         register int line;          register int line;
         struct iftot *lastif, *sum, *interesting;          struct iftot *lastif, *sum, *interesting;
         struct ifnet_head ifhead;       /* TAILQ_HEAD */          struct ifnet_head ifhead;       /* TAILQ_HEAD */
         int oldmask;          sigset_t emptyset;
   
         /*          /*
          * Find the pointer to the first ifnet structure.  Replace           * Find the pointer to the first ifnet structure.  Replace
Line 552 
Line 552 
         putchar('\n');          putchar('\n');
         fflush(stdout);          fflush(stdout);
         line++;          line++;
         oldmask = sigblock(sigmask(SIGALRM));          sigemptyset(&emptyset);
         if (! signalled) {          if (!signalled)
                 sigpause(0);                  sigsuspend(&emptyset);
         }  
         sigsetmask(oldmask);  
         signalled = NO;          signalled = NO;
         (void)alarm(interval);          (void)alarm(interval);
         if (line == 21)          if (line == 21)

Legend:
Removed from v.1.25  
changed lines
  Added in v.1.26