You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by mt...@apache.org on 2017/12/08 14:28:56 UTC
svn commit: r1817507 - in
/commons/proper/daemon/branches/1.0.x/src/native/windows:
apps/prunsrv/prunsrv.c apps/prunsrv/prunsrv.h apps/prunsrv/prunsrv.rc
include/Makefile.inc
Author: mturk
Date: Fri Dec 8 14:28:55 2017
New Revision: 1817507
URL: http://svn.apache.org/viewvc?rev=1817507&view=rev
Log:
Do not set event if not initialized
Modified:
commons/proper/daemon/branches/1.0.x/src/native/windows/apps/prunsrv/prunsrv.c
commons/proper/daemon/branches/1.0.x/src/native/windows/apps/prunsrv/prunsrv.h
commons/proper/daemon/branches/1.0.x/src/native/windows/apps/prunsrv/prunsrv.rc
commons/proper/daemon/branches/1.0.x/src/native/windows/include/Makefile.inc
Modified: commons/proper/daemon/branches/1.0.x/src/native/windows/apps/prunsrv/prunsrv.c
URL: http://svn.apache.org/viewvc/commons/proper/daemon/branches/1.0.x/src/native/windows/apps/prunsrv/prunsrv.c?rev=1817507&r1=1817506&r2=1817507&view=diff
==============================================================================
--- commons/proper/daemon/branches/1.0.x/src/native/windows/apps/prunsrv/prunsrv.c (original)
+++ commons/proper/daemon/branches/1.0.x/src/native/windows/apps/prunsrv/prunsrv.c Fri Dec 8 14:28:55 2017
@@ -1018,7 +1018,7 @@ static DWORD WINAPI serviceStop(LPVOID l
}
if (!apxProcessSetExecutableW(hWorker, SO_STOPIMAGE)) {
apxLogWrite(APXLOG_MARK_ERROR "Failed setting process executable %S",
- SO_STARTIMAGE);
+ SO_STOPIMAGE);
rv = 2;
goto cleanup;
}
@@ -1112,7 +1112,9 @@ cleanup:
}
apxLogWrite(APXLOG_MARK_INFO "Service stop thread completed.");
- SetEvent(gShutdownEvent);
+ if (gShutdownEvent) {
+ SetEvent(gShutdownEvent);
+ }
return rv;
}
@@ -1544,6 +1546,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
*/
@@ -1768,6 +1771,10 @@ cleanup:
_service_mode = FALSE;
_flushall();
apxLogClose(NULL);
+#if 0
+ /* Memory will be destoyed uppon exit
+ */
apxHandleManagerDestroy();
+#endif
ExitProcess(rv);
}
Modified: commons/proper/daemon/branches/1.0.x/src/native/windows/apps/prunsrv/prunsrv.h
URL: http://svn.apache.org/viewvc/commons/proper/daemon/branches/1.0.x/src/native/windows/apps/prunsrv/prunsrv.h?rev=1817507&r1=1817506&r2=1817507&view=diff
==============================================================================
--- commons/proper/daemon/branches/1.0.x/src/native/windows/apps/prunsrv/prunsrv.h (original)
+++ commons/proper/daemon/branches/1.0.x/src/native/windows/apps/prunsrv/prunsrv.h Fri Dec 8 14:28:55 2017
@@ -14,18 +14,11 @@
* limitations under the License.
*/
-/* ====================================================================
- * jar2exe -- convert .jar file to WIN32 executable.
- * Contributed by Mladen Turk <mt...@apache.org>
- * 05 Aug 2003
- * ====================================================================
- */
-
#ifndef _PRUNSRV_H
#define _PRUNSRV_H
#undef PRG_VERSION
-#define PRG_VERSION "1.0.15.0"
+#define PRG_VERSION "1.0.16.0"
#define PRG_REGROOT L"Apache Software Foundation\\Procrun 2.0"
#endif /* _PRUNSRV_H */
Modified: commons/proper/daemon/branches/1.0.x/src/native/windows/apps/prunsrv/prunsrv.rc
URL: http://svn.apache.org/viewvc/commons/proper/daemon/branches/1.0.x/src/native/windows/apps/prunsrv/prunsrv.rc?rev=1817507&r1=1817506&r2=1817507&view=diff
==============================================================================
--- commons/proper/daemon/branches/1.0.x/src/native/windows/apps/prunsrv/prunsrv.rc (original)
+++ commons/proper/daemon/branches/1.0.x/src/native/windows/apps/prunsrv/prunsrv.rc Fri Dec 8 14:28:55 2017
@@ -23,8 +23,8 @@ IDI_MAINICON ICON
CREATEPROCESS_MANIFEST_RESOURCE_ID RT_MANIFEST "prunsrv.manifest"
1 VERSIONINFO
- FILEVERSION 1,0,15,0
- PRODUCTVERSION 1,0,15,0
+ FILEVERSION 1,0,16,0
+ PRODUCTVERSION 1,0,16,0
FILEFLAGSMASK 0x3fL
#if defined(_DEBUG)
FILEFLAGS 0x03L
@@ -44,7 +44,7 @@ BEGIN
VALUE "FileDescription", RSTR_PRUNSRV "\0"
VALUE "FileVersion", PRG_VERSION
VALUE "InternalName", RSTR_PRUNSRV "\0"
- VALUE "LegalCopyright", "Copyright (c) 2000-2013 The Apache Software Foundation.\0"
+ VALUE "LegalCopyright", "Copyright (c) 2000-2017 The Apache Software Foundation.\0"
VALUE "OriginalFilename", "prunsrv.exe\0"
VALUE "ProductName", RSTR_PRUNSRV "\0"
VALUE "ProductVersion", PRG_VERSION
Modified: commons/proper/daemon/branches/1.0.x/src/native/windows/include/Makefile.inc
URL: http://svn.apache.org/viewvc/commons/proper/daemon/branches/1.0.x/src/native/windows/include/Makefile.inc?rev=1817507&r1=1817506&r2=1817507&view=diff
==============================================================================
--- commons/proper/daemon/branches/1.0.x/src/native/windows/include/Makefile.inc (original)
+++ commons/proper/daemon/branches/1.0.x/src/native/windows/include/Makefile.inc Fri Dec 8 14:28:55 2017
@@ -284,7 +284,7 @@ COMMON_LFLAGS = /NOLOGO
# Always add debugging to the linker
OPT_LFLAGS = /INCREMENTAL:NO /DEBUG
!IF "$(BUILD)" == "RELEASE"
-OPT_LFLAGS = /OPT:REF
+OPT_LFLAGS = $(OPT_LFLAGS) /OPT:REF
!ENDIF
!IF "$(TARGET)" == "EXE"