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

Diff for /src/usr.bin/mg/fileio.c between version 1.19 and 1.20

version 1.19, 2001/07/09 07:04:49 version 1.20, 2001/09/21 15:08:16
Line 398 
Line 398 
         pid_t   pid;          pid_t   pid;
         int     status;          int     status;
   
         if ((pid = vfork())) {          switch ((pid = vfork())) {
                 if (pid == -1)          case -1:
                         return -1;                  return -1;
           case 0:
                 execl("/bin/cp", "cp", frname, toname, (char *)NULL);                  execl("/bin/cp", "cp", frname, toname, (char *)NULL);
                 _exit(1);       /* shouldn't happen */                  _exit(1);       /* shouldn't happen */
           default:
                   waitpid(pid, &status, 0);
                   return (WIFEXITED(status) && WEXITSTATUS(status) == 0);
         }          }
         waitpid(pid, &status, 0);  
         return (WIFEXITED(status) && WEXITSTATUS(status) == 0);  
 }  }
   
 BUFFER *  BUFFER *

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