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

Diff for /src/usr.bin/man/Attic/man.c between version 1.18 and 1.19

version 1.18, 2001/08/18 21:59:37 version 1.19, 2001/11/17 03:09:44
Line 82 
Line 82 
 static void      onsig __P((int));  static void      onsig __P((int));
 static void      usage __P((void));  static void      usage __P((void));
   
   sigset_t        blocksigs;
   
 int  int
 main(argc, argv)  main(argc, argv)
         int argc;          int argc;
Line 322 
Line 324 
         (void)signal(SIGINT, onsig);          (void)signal(SIGINT, onsig);
         (void)signal(SIGHUP, onsig);          (void)signal(SIGHUP, onsig);
   
           sigemptyset(&blocksigs);
           sigaddset(&blocksigs, SIGINT);
           sigaddset(&blocksigs, SIGHUP);
   
         memset(&pg, 0, sizeof(pg));          memset(&pg, 0, sizeof(pg));
         for (found = 0; *argv; ++argv)          for (found = 0; *argv; ++argv)
                 if (manual(*argv, defp, &pg))                  if (manual(*argv, defp, &pg))
Line 500 
Line 506 
   
         /* If not found, enter onto the missing list. */          /* If not found, enter onto the missing list. */
         if (!anyfound) {          if (!anyfound) {
                   sigset_t osigs;
   
                   sigprocmask(SIG_BLOCK, &blocksigs, &osigs);
   
                 if ((missp = getlist("_missing")) == NULL)                  if ((missp = getlist("_missing")) == NULL)
                         missp = addlist("_missing");                          missp = addlist("_missing");
                 if ((ep = malloc(sizeof(ENTRY))) == NULL ||                  if ((ep = malloc(sizeof(ENTRY))) == NULL ||
Line 509 
Line 519 
                         exit(1);                          exit(1);
                 }                  }
                 TAILQ_INSERT_TAIL(&missp->list, ep, q);                  TAILQ_INSERT_TAIL(&missp->list, ep, q);
                   sigprocmask(SIG_SETMASK, &osigs, NULL);
         }          }
         return (anyfound);          return (anyfound);
 }  }
Line 527 
Line 538 
         int fd, n;          int fd, n;
         char *p, *b;          char *p, *b;
         char buf[MAXPATHLEN], cmd[MAXPATHLEN], tpath[MAXPATHLEN];          char buf[MAXPATHLEN], cmd[MAXPATHLEN], tpath[MAXPATHLEN];
           sigset_t osigs;
   
         /* Let the user know this may take awhile. */          /* Let the user know this may take awhile. */
         if (!warned) {          if (!warned) {
Line 558 
Line 570 
   
   
         /* Add a remove-when-done list. */          /* Add a remove-when-done list. */
           sigprocmask(SIG_BLOCK, &blocksigs, &osigs);
         if ((intmpp = getlist("_intmp")) == NULL)          if ((intmpp = getlist("_intmp")) == NULL)
                 intmpp = addlist("_intmp");                  intmpp = addlist("_intmp");
           sigprocmask(SIG_SETMASK, &osigs, NULL);
   
         /* Move to the printf(3) format string. */          /* Move to the printf(3) format string. */
         for (; *fmt && isspace(*fmt); ++fmt)          for (; *fmt && isspace(*fmt); ++fmt)
Line 740 
Line 754 
         (void)kill(getpid(), signo);          (void)kill(getpid(), signo);
   
         /* NOTREACHED */          /* NOTREACHED */
         exit (1);          _exit(1);
 }  }
   
 /*  /*

Legend:
Removed from v.1.18  
changed lines
  Added in v.1.19