You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by gg...@apache.org on 2018/04/08 17:15:46 UTC
svn commit: r1828655 - in /commons/proper/daemon/trunk/src:
changes/changes.xml native/windows/apps/prunsrv/prunsrv.c
Author: ggregory
Date: Sun Apr 8 17:15:45 2018
New Revision: 1828655
URL: http://svn.apache.org/viewvc?rev=1828655&view=rev
Log:
[DAEMON-384] prunsrv stopping with error due to hardcoded timeout.
Modified:
commons/proper/daemon/trunk/src/changes/changes.xml
commons/proper/daemon/trunk/src/native/windows/apps/prunsrv/prunsrv.c
Modified: commons/proper/daemon/trunk/src/changes/changes.xml
URL: http://svn.apache.org/viewvc/commons/proper/daemon/trunk/src/changes/changes.xml?rev=1828655&r1=1828654&r2=1828655&view=diff
==============================================================================
--- commons/proper/daemon/trunk/src/changes/changes.xml (original)
+++ commons/proper/daemon/trunk/src/changes/changes.xml Sun Apr 8 17:15:45 2018
@@ -47,7 +47,10 @@
Only set the global shutdown event if the event is created.
</action>
<action issue="DAEMON-379" type="fix" dev="sebb">
- Unable to build with java-9 using ant; dropped Ant build files
+ Unable to build with Java 9 using ant; dropped Ant build files
+ </action>
+ <action issue="DAEMON-384" type="fix" dev="ggregory" due-to="blassmegod">
+ prunsrv stopping with error due to hardcoded timeout.
</action>
</release>
<release version="1.1.0" date="2017-11-15" description="Feature and bug fix release">
Modified: commons/proper/daemon/trunk/src/native/windows/apps/prunsrv/prunsrv.c
URL: http://svn.apache.org/viewvc/commons/proper/daemon/trunk/src/native/windows/apps/prunsrv/prunsrv.c?rev=1828655&r1=1828654&r2=1828655&view=diff
==============================================================================
--- commons/proper/daemon/trunk/src/native/windows/apps/prunsrv/prunsrv.c (original)
+++ commons/proper/daemon/trunk/src/native/windows/apps/prunsrv/prunsrv.c Sun Apr 8 17:15:45 2018
@@ -1353,7 +1353,12 @@ void WINAPI service_ctrl_handler(DWORD d
case SERVICE_CONTROL_SHUTDOWN:
apxLogWrite(APXLOG_MARK_INFO "Service SHUTDOWN signalled");
case SERVICE_CONTROL_STOP:
- reportServiceStatus(SERVICE_STOP_PENDING, NO_ERROR, 3 * 1000);
+ if (SO_STOPTIMEOUT > 0) {
+ reportServiceStatus(SERVICE_STOP_PENDING, NO_ERROR, SO_STOPTIMEOUT * 1000);
+ }
+ else {
+ reportServiceStatus(SERVICE_STOP_PENDING, NO_ERROR, 3 * 1000);
+ }
/* Stop the service asynchronously */
stopThread = CreateThread(NULL, 0,
serviceStop,