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


##########
src/native/windows/apps/prunsrv/prunsrv.c:
##########
@@ -951,15 +970,34 @@ static BOOL docmdStopService(LPAPXCMDLINE lpCmdline)
                                NULL);
         if (!rv) {
             /* Wait for the timeout if any */
-            int  timeout     = SO_STOPTIMEOUT;
-            if (timeout) {
-                int i;
-                for (i = 0; i < timeout; i++) {
-                    rv = apxServiceCheckStop(hService);
-                    apxLogWrite(APXLOG_MARK_DEBUG "apxServiceCheck returns 
%d.", rv);
-                    if (rv)
-                        break;
-                }
+            int timeout     = SO_STOPTIMEOUT;
+            int waited      = waitedSinceStopCmd();
+            int i;
+            if (timeout <= 0) {
+                /* waiting for ever doesn't look OK here */
+                timeout = ONE_MINUTE_SEC;
+            }

Review Comment:
   OK I have fixed to reject any attempt to create such a service.



-- 
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