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

Diff for /mandoc/compat_fts.c between version 1.4 and 1.5

version 1.4, 2014/08/17 20:45:59 version 1.5, 2014/12/11 09:05:01
Line 146  fts_open(char * const *argv, int options, void *dummy)
Line 146  fts_open(char * const *argv, int options, void *dummy)
          * and ".." are all fairly nasty problems.  Note, if we can't get the           * and ".." are all fairly nasty problems.  Note, if we can't get the
          * descriptor we run anyway, just more slowly.           * descriptor we run anyway, just more slowly.
          */           */
         if (!ISSET(FTS_NOCHDIR) && (sp->fts_rfd = open(".", O_RDONLY, 0)) < 0)          if (!ISSET(FTS_NOCHDIR) &&
               (sp->fts_rfd = open(".", O_RDONLY | O_CLOEXEC)) < 0)
                 SET(FTS_NOCHDIR);                  SET(FTS_NOCHDIR);
   
         if (nitems == 0)          if (nitems == 0)
Line 803  fts_safe_changedir(FTS *sp, FTSENT *p, int fd, const c
Line 804  fts_safe_changedir(FTS *sp, FTSENT *p, int fd, const c
         newfd = fd;          newfd = fd;
         if (ISSET(FTS_NOCHDIR))          if (ISSET(FTS_NOCHDIR))
                 return (0);                  return (0);
         if (fd < 0 && (newfd = open(path, O_RDONLY, 0)) < 0)          if (fd < 0 && (newfd = open(path, O_RDONLY|O_DIRECTORY|O_CLOEXEC)) < 0)
                 return (-1);                  return (-1);
         if (fstat(newfd, &sb)) {          if (fstat(newfd, &sb)) {
                 ret = -1;                  ret = -1;

Legend:
Removed from v.1.4  
changed lines
  Added in v.1.5

CVSweb