httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From b..@locus.apache.org
Subject cvs commit: apache-2.0/src/lib/apr/threadproc/os2 thread.c
Date Thu, 20 Apr 2000 14:43:48 GMT
bjh         00/04/20 07:43:47

  Modified:    src/lib/apr/threadproc/os2 thread.c
  Log:
  OS/2: Sort out error handling in ap_thread_join()
  
  Revision  Changes    Path
  1.12      +7 -2      apache-2.0/src/lib/apr/threadproc/os2/thread.c
  
  Index: thread.c
  ===================================================================
  RCS file: /home/cvs/apache-2.0/src/lib/apr/threadproc/os2/thread.c,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- thread.c	2000/04/14 15:58:48	1.11
  +++ thread.c	2000/04/20 14:43:46	1.12
  @@ -52,13 +52,14 @@
    * <http://www.apache.org/>.
    */
   
  +#define INCL_DOSERRORS
  +#define INCL_DOS
   #include "threadproc.h"
   #include "apr_thread_proc.h"
   #include "apr_general.h"
   #include "apr_lib.h"
   #include "fileio.h"
   #include <stdlib.h>
  -#define INCL_DOS
   #include <os2.h>
   
   ap_status_t ap_create_threadattr(ap_threadattr_t **new, ap_pool_t *cont)
  @@ -160,9 +161,13 @@
       TID waittid = thd->tid;
   
       if (thd->attr->attr & APR_THREADATTR_DETACHED)
  -        return APR_ENOSTAT;
  +        return APR_EINVAL;
   
       rc = DosWaitThread(&waittid, DCWW_WAIT);
  +
  +    if (rc == ERROR_INVALID_THREADID)
  +        rc = 0; /* Thread had already terminated */
  +
       *retval = (ap_status_t)thd->rv;
       return APR_OS2_STATUS(rc);
   }
  
  
  

Mime
View raw message