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


##########
src/native/windows/apps/prunsrv/prunsrv.c:
##########
@@ -1269,7 +1277,7 @@ static DWORD WINAPI serviceStop(LPVOID lpParameter)
         }
         else {
             if (lstrcmpA(_jni_sclass, "java/lang/System") == 0) {
-                reportServiceStatus(SERVICE_STOP_PENDING, NO_ERROR, 20 * 1000);
+                reportServiceStatus(SERVICE_STOP_PENDING, NO_ERROR, 
ONE_MINUTE);

Review Comment:
   That is a hint procrun gives to the windows service manager, it needs to be 
bigger than the time procrun needs to stop the service, otherwise an error is 
reported.
   According to the 
https://learn.microsoft.com/en-us/windows/win32/api/winsvc/ns-winsvc-service_status
 the hint time is the next time procrun will interact with the windows service 
manger. So ONE_MINUTE is just a arbitrary value... 



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