[BACK]Return to main.c CVS log [TXT][DIR] Up to [cvsweb.bsd.lv] / mandoc

Diff for /mandoc/main.c between version 1.254 and 1.255

version 1.254, 2015/11/06 16:30:33 version 1.255, 2015/11/06 17:33:34
Line 149  main(int argc, char *argv[])
Line 149  main(int argc, char *argv[])
                 return mandocdb(argc, argv);                  return mandocdb(argc, argv);
 #endif  #endif
   
   #if HAVE_PLEDGE
           if (pledge("stdio rpath tmppath proc exec flock", NULL) == -1)
                   err((int)MANDOCLEVEL_SYSERR, "pledge");
   #endif
   
         /* Search options. */          /* Search options. */
   
         memset(&conf, 0, sizeof(conf));          memset(&conf, 0, sizeof(conf));
Line 288  main(int argc, char *argv[])
Line 293  main(int argc, char *argv[])
             !isatty(STDOUT_FILENO))              !isatty(STDOUT_FILENO))
                 use_pager = 0;                  use_pager = 0;
   
   #if HAVE_PLEDGE
           if (!use_pager && pledge("stdio rpath flock", NULL) == -1)
                   err((int)MANDOCLEVEL_SYSERR, "pledge");
   #endif
   
         /* Parse arguments. */          /* Parse arguments. */
   
         if (argc > 0) {          if (argc > 0) {
Line 414  main(int argc, char *argv[])
Line 424  main(int argc, char *argv[])
   
         /* mandoc(1) */          /* mandoc(1) */
   
   #if HAVE_PLEDGE
           if (pledge(use_pager ? "stdio rpath tmppath proc exec" :
               "stdio rpath", NULL) == -1)
                   err((int)MANDOCLEVEL_SYSERR, "pledge");
   #endif
   
         if (search.argmode == ARG_FILE && ! moptions(&options, auxpaths))          if (search.argmode == ARG_FILE && ! moptions(&options, auxpaths))
                 return (int)MANDOCLEVEL_BADARG;                  return (int)MANDOCLEVEL_BADARG;
   
Line 1004  spawn_pager(struct tag_files *tag_files)
Line 1020  spawn_pager(struct tag_files *tag_files)
         case 0:          case 0:
                 break;                  break;
         default:          default:
   #if HAVE_PLEDGE
                   if (pledge("stdio rpath tmppath", NULL) == -1)
                           err((int)MANDOCLEVEL_SYSERR, "pledge");
   #endif
                 return pager_pid;                  return pager_pid;
         }          }
   

Legend:
Removed from v.1.254  
changed lines
  Added in v.1.255

CVSweb