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

Diff for /src/usr.bin/cvs/util.c between version 1.131 and 1.132

version 1.131, 2008/02/04 18:23:58 version 1.132, 2008/02/04 19:08:32
Line 33 
Line 33 
 #include <md5.h>  #include <md5.h>
 #include <stdlib.h>  #include <stdlib.h>
 #include <string.h>  #include <string.h>
   #include <paths.h>
 #include <unistd.h>  #include <unistd.h>
   
 #include "cvs.h"  #include "cvs.h"
Line 823 
Line 824 
                         c = getchar();                          c = getchar();
   
         return (ret);          return (ret);
   }
   
   void
   cvs_exec(const char *prog)
   {
           pid_t pid;
           char *argp[] = { "sh", "-c", NULL, NULL };
   
           argp[2] = prog;
   
           if ((pid = fork()) == -1) {
                   cvs_log(LP_ERR, "cvs_exec: fork failed");
                   return;
           } else if (pid == 0) {
                   execv(_PATH_BSHELL, argp);
                   cvs_log(LP_ERR, "failed to run '%s'", prog);
                   _exit(127);
           }
 }  }

Legend:
Removed from v.1.131  
changed lines
  Added in v.1.132