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

Diff for /mandoc/mandocdb.c between version 1.253 and 1.254

version 1.253, 2017/07/28 14:48:25 version 1.254, 2017/08/26 12:59:17
Line 2119  dbprune(struct dba *dba)
Line 2119  dbprune(struct dba *dba)
 static void  static void
 dbwrite(struct dba *dba)  dbwrite(struct dba *dba)
 {  {
         char             tfn[32];          char             tfn[33];
         int              status;          int              status;
         pid_t            child;          pid_t            child;
   
Line 2193  dbwrite(struct dba *dba)
Line 2193  dbwrite(struct dba *dba)
         }          }
   
 out:  out:
           unlink(tfn);
         *strrchr(tfn, '/') = '\0';          *strrchr(tfn, '/') = '\0';
         switch (child = fork()) {          rmdir(tfn);
         case -1:  
                 exitcode = (int)MANDOCLEVEL_SYSERR;  
                 say("", "&fork rm");  
                 return;  
         case 0:  
                 execlp("rm", "rm", "-rf", tfn, (char *)NULL);  
                 say("", "&exec rm");  
                 exit((int)MANDOCLEVEL_SYSERR);  
         default:  
                 break;  
         }  
         if (waitpid(child, &status, 0) == -1) {  
                 exitcode = (int)MANDOCLEVEL_SYSERR;  
                 say("", "&wait rm");  
         } else if (WIFSIGNALED(status) || WEXITSTATUS(status)) {  
                 exitcode = (int)MANDOCLEVEL_SYSERR;  
                 say("", "%s: Cannot remove temporary directory", tfn);  
         }  
 }  }
   
 static int  static int

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

CVSweb