apr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From thom...@apache.org
Subject cvs commit: apr/threadproc/unix proc.c
Date Thu, 08 May 2003 08:51:02 GMT
thommay     2003/05/08 01:51:02

  Modified:    .        CHANGES
               threadproc/unix proc.c
  Log:
  (apr_proc_wait): Handle interrupted waitpid(2) calls by calling
  it repeatedly until it succeeds or fails with errno other than
  EINTR.  This hides this UNIX-specific behavior from APR clients.
  
  Submitted by: Eric Gillespie <epg@pretzelnet.org>
  Reviewed by: Thom May
  
  Revision  Changes    Path
  1.407     +4 -0      apr/CHANGES
  
  Index: CHANGES
  ===================================================================
  RCS file: /home/cvs/apr/CHANGES,v
  retrieving revision 1.406
  retrieving revision 1.407
  diff -u -r1.406 -r1.407
  --- CHANGES	3 May 2003 04:11:07 -0000	1.406
  +++ CHANGES	8 May 2003 08:51:02 -0000	1.407
  @@ -1,5 +1,9 @@
   Changes with APR 0.9.4
   
  +  *) apr_proc_wait(): Handle interrupted waitpid(2) calls by calling
  +     it repeatedly until it succeeds or fails with errno other than
  +     EINTR.  This hides this UNIX-specific behavior from APR clients.
  +
     *) Removed the solaris-specific atomic code, due to licence
        concerns (it was MPL 1.0, and the author could not be contacted)
        [Ian Holsman]
  
  
  
  1.67      +5 -1      apr/threadproc/unix/proc.c
  
  Index: proc.c
  ===================================================================
  RCS file: /home/cvs/apr/threadproc/unix/proc.c,v
  retrieving revision 1.66
  retrieving revision 1.67
  diff -u -r1.66 -r1.67
  --- proc.c	21 Apr 2003 22:36:56 -0000	1.66
  +++ proc.c	8 May 2003 08:51:02 -0000	1.67
  @@ -556,7 +556,11 @@
           waitpid_options |= WNOHANG;
       }
   
  -    if ((pstatus = waitpid(proc->pid, &exit_int, waitpid_options)) > 0) {
  +    do {
  +        pstatus = waitpid(proc->pid, &exit_int, waitpid_options);
  +    } while (pstatus < 0 && errno == EINTR);
  +
  +    if (pstatus > 0) {
           proc->pid = pstatus;
   
           if (WIFEXITED(exit_int)) {
  
  
  

Mime
View raw message