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

Diff for /src/usr.bin/top/top.c between version 1.29 and 1.30

version 1.29, 2003/09/19 10:32:24 version 1.30, 2003/11/01 20:20:57
Line 362 
Line 362 
         sigprocmask(SIG_BLOCK, &mask, &oldmask);          sigprocmask(SIG_BLOCK, &mask, &oldmask);
         init_screen();          init_screen();
         (void) signal(SIGINT, leave);          (void) signal(SIGINT, leave);
           siginterrupt(SIGINT, 1);
         (void) signal(SIGQUIT, leave);          (void) signal(SIGQUIT, leave);
         (void) signal(SIGTSTP, tstop);          (void) signal(SIGTSTP, tstop);
         (void) signal(SIGWINCH, winch);          (void) signal(SIGWINCH, winch);
Line 562 
Line 563 
          */           */
         if (poll(pfd, 1, delay * 1000) > 0) {          if (poll(pfd, 1, delay * 1000) > 0) {
                 char *errmsg;                  char *errmsg;
                   ssize_t len;
                 int newval;                  int newval;
   
                 clear_message();                  clear_message();
Line 570 
Line 572 
                  * now read it and convert to                   * now read it and convert to
                  * command strchr                   * command strchr
                  */                   */
                 (void) read(0, &ch, 1);                  while (1) {
                           len = read(0, &ch, 1);
                           if (len == -1 && errno == EINTR)
                                   continue;
                           if (len == 0)
                                   exit(1);
                           break;
                   }
                 if ((iptr = strchr(command_chars, ch)) == NULL) {                  if ((iptr = strchr(command_chars, ch)) == NULL) {
                         /* illegal command */                          /* illegal command */
                         new_message(MT_standout, " Command not understood");                          new_message(MT_standout, " Command not understood");
Line 620 
Line 629 
                         show_help();                          show_help();
                         standout("Hit any key to continue: ");                          standout("Hit any key to continue: ");
                         fflush(stdout);                          fflush(stdout);
                         (void) read(0, &ch, 1);                          while (1) {
                                   len = read(0, &ch, 1);
                                   if (len == -1 && errno == EINTR)
                                           continue;
                                   if (len == 0)
                                           exit(1);
                                   break;
                           }
                         break;                          break;
   
                 case CMD_errors:        /* show errors */                  case CMD_errors:        /* show errors */
Line 636 
Line 652 
                                 show_errors();                                  show_errors();
                                 standout("Hit any key to continue: ");                                  standout("Hit any key to continue: ");
                                 fflush(stdout);                                  fflush(stdout);
                                 (void) read(0, &ch, 1);                                  while (1) {
                                           len = read(0, &ch, 1);
                                           if (len == -1 && errno == EINTR)
                                                   continue;
                                           if (len == 0)
                                                   exit(1);
                                           break;
                                   }
                         }                          }
                         break;                          break;
   

Legend:
Removed from v.1.29  
changed lines
  Added in v.1.30