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 2020/11/13 11:16:10 UTC
[commons-daemon] branch master updated: Fix DAEMON-425 avoid crash
if options is not set in registry
This is an automated email from the ASF dual-hosted git repository.
markt pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-daemon.git
The following commit(s) were added to refs/heads/master by this push:
new f9d4957 Fix DAEMON-425 avoid crash if options is not set in registry
f9d4957 is described below
commit f9d495704079919b6ba2d28f84743ee04671f8c6
Author: Mark Thomas <ma...@apache.org>
AuthorDate: Fri Nov 13 11:15:49 2020 +0000
Fix DAEMON-425 avoid crash if options is not set in registry
https://issues.apache.org/jira/browse/DAEMON-425
---
src/changes/changes.xml | 4 ++++
src/native/windows/apps/prunsrv/prunsrv.c | 4 +++-
2 files changed, 7 insertions(+), 1 deletion(-)
diff --git a/src/changes/changes.xml b/src/changes/changes.xml
index d4345da..c8eb5dc 100644
--- a/src/changes/changes.xml
+++ b/src/changes/changes.xml
@@ -39,6 +39,10 @@
</properties>
<body>
<release version="1.2.4" date="TBD" description="Bug fix release">
+ <action issue="DAEMON-425" type="fix" dev="markt">
+ Procrun. Correct a regression introduced in 1.2.3. Enable the service to
+ start if the Options value is not present in the registry.
+ </action>
</release>
<release version="1.2.3" date="2020-09-01" description="Bug fix release">
<action issue="DAEMON-411" type="fix" dev="markt">
diff --git a/src/native/windows/apps/prunsrv/prunsrv.c b/src/native/windows/apps/prunsrv/prunsrv.c
index a5d8697..0534b08 100644
--- a/src/native/windows/apps/prunsrv/prunsrv.c
+++ b/src/native/windows/apps/prunsrv/prunsrv.c
@@ -1355,7 +1355,9 @@ static DWORD serviceStart()
/* Some options require additional environment settings to be in place
* before Java is started
*/
- setInprocEnvironmentOptions(SO_JVMOPTIONS);
+ if (IS_VALID_STRING(SO_JVMOPTIONS)) {
+ setInprocEnvironmentOptions(SO_JVMOPTIONS);
+ }
/* Create the JVM global worker */
gWorker = apxCreateJava(gPool, _jni_jvmpath, SO_JAVAHOME);
if (IS_INVALID_HANDLE(gWorker)) {