jfclere commented on code in PR #238:
URL: https://github.com/apache/commons-daemon/pull/238#discussion_r1998381076


##########
src/native/windows/apps/prunsrv/prunsrv.c:
##########
@@ -1876,8 +1908,21 @@ void WINAPI serviceMain(DWORD argc, LPTSTR *argv)
          */
         apxLogWrite(APXLOG_MARK_DEBUG "Waiting 1 minute for all threads to 
exit.");
         reportServiceStatus(SERVICE_STOP_PENDING, NO_ERROR, ONE_MINUTE);
-        apxDestroyJvm(ONE_MINUTE);
-        /* if we are not using JAVA apxDestroyJvm does nothing, check the chid 
processes in case they hang */
+        if (!apxDestroyJvm(ONE_MINUTE)) {
+            /* if we are not using JAVA apxDestroyJvm does nothing, check the 
chid processes in case they hang */
+            apxLogWrite(APXLOG_MARK_DEBUG "Not using JAVA apxDestroyJvm did 
nothing");
+            DWORD count = SO_STOPTIMEOUT;
+            if (!count)
+                count = ONE_MINUTE_SEC;
+            do {

Review Comment:
   Yes we are trying to kill any processes we created in that case.
   So I need to add a something to store the total time procrun has been 
waiting :-(
   And hope that the timeout is big enough to make sure the processes cleaning 
is done.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to