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

Diff for /src/usr.bin/mail/popen.c between version 1.12 and 1.13

version 1.12, 1997/08/05 04:00:00 version 1.13, 1997/08/31 14:32:14
Line 63 
Line 63 
         int pid;          int pid;
         char done;          char done;
         char free;          char free;
         union wait status;          int status;
         struct child *link;          struct child *link;
 };  };
 static struct child *child;  static struct child *child;
Line 345 
Line 345 
         int signo;          int signo;
 {  {
         int pid;          int pid;
         union wait status;          int status;
         register struct child *cp;          register struct child *cp;
         int save_errno = errno;          int save_errno = errno;
   
         while ((pid =          while ((pid =
             wait3((int *)&status, WNOHANG, (struct rusage *)0)) > 0) {              waitpid((pid_t)-1, &status, WNOHANG)) > 0) {
                 cp = findchild(pid);                  cp = findchild(pid);
                 if (cp->free)                  if (cp->free)
                         delchild(cp);                          delchild(cp);
Line 362 
Line 362 
         errno = save_errno;          errno = save_errno;
 }  }
   
 union wait wait_status;  int wait_status;
   
 /*  /*
  * Wait for a specific child to die.   * Wait for a specific child to die.
Line 383 
Line 383 
         wait_status = cp->status;          wait_status = cp->status;
         delchild(cp);          delchild(cp);
         sigprocmask(SIG_SETMASK, &oset, NULL);          sigprocmask(SIG_SETMASK, &oset, NULL);
         return(wait_status.w_status ? -1 : 0);          return((WIFEXITED(wait_status) && WEXITSTATUS(wait_status)) ? -1 : 0);
 }  }
   
 /*  /*

Legend:
Removed from v.1.12  
changed lines
  Added in v.1.13