commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From billbar...@apache.org
Subject cvs commit: jakarta-commons/daemon/src/native/nt/procrun/src handles.c javajni.c
Date Thu, 17 Jun 2004 02:04:16 GMT
billbarker    2004/06/16 19:04:16

  Modified:    daemon/src/native/nt/procrun/src handles.c javajni.c
  Log:
  Small changes.
  
  1) Only detach from the JVM if we attached.  Also fixes a rare race condition on thread
access.
  2) When destroying pool Handles, we can't loop normally since the handle is destroyed before
we get to next on it.  Probably only noticable when running the DEBUG build.
  
  Revision  Changes    Path
  1.2       +3 -1      jakarta-commons/daemon/src/native/nt/procrun/src/handles.c
  
  Index: handles.c
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/daemon/src/native/nt/procrun/src/handles.c,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- handles.c	7 Apr 2004 11:24:47 -0000	1.1
  +++ handles.c	17 Jun 2004 02:04:16 -0000	1.2
  @@ -182,7 +182,9 @@
           __apxPoolCallback(hCur, uMsg, 0, 0);
       }
       /* call the handles callback */        
  -    TAILQ_FOREACH(hCur, &lpPool->lHandles, queue) {
  +    for(hCur = TAILQ_FIRST(&lpPool->lHandles) ;
  +        hCur != NULL ;
  +        hCur = TAILQ_FIRST(&lpPool->lHandles)) {
           apxCloseHandle(hCur);
       }
       /* if we are closing this pool destroy the private Heap */
  
  
  
  1.3       +1 -1      jakarta-commons/daemon/src/native/nt/procrun/src/javajni.c
  
  Index: javajni.c
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/daemon/src/native/nt/procrun/src/javajni.c,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- javajni.c	8 Apr 2004 16:50:50 -0000	1.2
  +++ javajni.c	17 Jun 2004 02:04:16 -0000	1.3
  @@ -522,9 +522,9 @@
                 lpJava->clWorker.jArgs);
   
       JVM_EXCEPTION_CLEAR(lpJava);
  +    __apxJvmDetach(lpJava);
   finished:
       lpJava->dwWorkerStatus = 0;
  -    __apxJvmDetach(lpJava);
       apxLogWrite(APXLOG_MARK_DEBUG "Java Worker thread finished");
       ExitThread(rv);
       /* never gets here but keep the compiler happy */
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Mime
View raw message