You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by ma...@apache.org on 2017/12/08 20:52:15 UTC
svn commit: r1817563 - in /commons/proper/daemon/trunk/src:
changes/changes.xml native/windows/apps/prunsrv/prunsrv.c
Author: markt
Date: Fri Dec 8 20:52:15 2017
New Revision: 1817563
URL: http://svn.apache.org/viewvc?rev=1817563&view=rev
Log:
Only set the global shutdown event if the event is created.
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=1817563&r1=1817562&r2=1817563&view=diff
==============================================================================
--- commons/proper/daemon/trunk/src/changes/changes.xml (original)
+++ commons/proper/daemon/trunk/src/changes/changes.xml Fri Dec 8 20:52:15 2017
@@ -39,6 +39,9 @@
</properties>
<body>
<release version="1.1.1" date="TBD" description="Bug fix release">
+ <action type="fix" dev="markt" due-to="mturk" >
+ 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
</action>
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=1817563&r1=1817562&r2=1817563&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 Fri Dec 8 20:52:15 2017
@@ -1160,7 +1160,9 @@ cleanup:
}
apxLogWrite(APXLOG_MARK_INFO "Service stop thread completed.");
- SetEvent(gShutdownEvent);
+ if (gShutdownEvent) {
+ SetEvent(gShutdownEvent);
+ }
return rv;
}
@@ -1588,6 +1590,7 @@ void WINAPI serviceMain(DWORD argc, LPTS
WaitForSingleObject(gShutdownEvent, ONE_MINUTE);
apxLogWrite(APXLOG_MARK_DEBUG "ShutdownEvent signaled");
CloseHandle(gShutdownEvent);
+ gShutdownEvent = NULL;
/* This will cause to wait for all threads to exit
*/