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 2022/01/27 18:56:29 UTC

[commons-daemon] branch master updated (f01d002 -> 3676acb)

This is an automated email from the ASF dual-hosted git repository.

markt pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/commons-daemon.git.


    from f01d002  year++
     new 67ac703  Clarify changes that only apply to Procrun
     new 3676acb  Fix DAEMON-437 - only redirect stdout/stderr for a running service

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 src/changes/changes.xml                   | 29 +++++++++++++++++------------
 src/native/windows/apps/prunsrv/prunsrv.c |  4 ++--
 2 files changed, 19 insertions(+), 14 deletions(-)

[commons-daemon] 02/02: Fix DAEMON-437 - only redirect stdout/stderr for a running service

Posted by ma...@apache.org.
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

commit 3676acb0320ffae380e92c258ca492a058c143d0
Author: Mark Thomas <ma...@apache.org>
AuthorDate: Thu Jan 27 18:56:23 2022 +0000

    Fix DAEMON-437 - only redirect stdout/stderr for a running service
    
    https://issues.apache.org/jira/projects/DAEMON/issues/DAEMON-437
---
 src/changes/changes.xml                   | 7 ++++++-
 src/native/windows/apps/prunsrv/prunsrv.c | 4 ++--
 2 files changed, 8 insertions(+), 3 deletions(-)

diff --git a/src/changes/changes.xml b/src/changes/changes.xml
index 380f67a..40b2a16 100644
--- a/src/changes/changes.xml
+++ b/src/changes/changes.xml
@@ -80,7 +80,12 @@
       </action>      
       <action type="add" dev="ggregory" due-to="Gary Gregory">
         Procrun. Add logging when failing to set the options of a service.
-      </action>      
+      </action>
+      <action issue="DAEMON-437" type="fix" dev="markt">
+        Procrun. Only redirect stderr and stdout to files for the running
+        service. Output from commands executed on the command line will not be
+        redirected.
+      </action>   
       <!-- -UPDATE -->
       <action type="update" dev="ggregory" due-to="Dependabot">
         Bump actions/cache from v2 to v2.1.7 #24, #30, #36.
diff --git a/src/native/windows/apps/prunsrv/prunsrv.c b/src/native/windows/apps/prunsrv/prunsrv.c
index f9813bc..3d31e46 100644
--- a/src/native/windows/apps/prunsrv/prunsrv.c
+++ b/src/native/windows/apps/prunsrv/prunsrv.c
@@ -1930,8 +1930,8 @@ void __cdecl main(int argc, char **argv)
     AplZeroMemory(&gStdwrap, sizeof(APX_STDWRAP));
     gStartPath = lpCmdline->szExePath;
     gStdwrap.szLogPath = SO_LOGPATH;
-    /* In debug mode allways use console */
-    if (lpCmdline->dwCmdIndex != 1) {
+    /* Only redirect when running as a service */
+    if (lpCmdline->dwCmdIndex == 2) {
         gStdwrap.szStdOutFilename = SO_STDOUTPUT;
         gStdwrap.szStdErrFilename = SO_STDERROR;
     }

[commons-daemon] 01/02: Clarify changes that only apply to Procrun

Posted by ma...@apache.org.
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

commit 67ac703ef07e296aece40e0170166288e1e82de9
Author: Mark Thomas <ma...@apache.org>
AuthorDate: Thu Jan 27 18:50:56 2022 +0000

    Clarify changes that only apply to Procrun
---
 src/changes/changes.xml | 22 +++++++++++-----------
 1 file changed, 11 insertions(+), 11 deletions(-)

diff --git a/src/changes/changes.xml b/src/changes/changes.xml
index cb7d735..380f67a 100644
--- a/src/changes/changes.xml
+++ b/src/changes/changes.xml
@@ -41,45 +41,45 @@
     <release version="1.2.5" date="2022-MM-DD" description="Bug fix release">
       <!-- FIX -->
       <action issue="DAEMON-430" type="fix" dev="jfclere">
-        Procrun --StopTimeout can be used to define the time that procrun waits for service to exit,
+        Procrun. --StopTimeout can be used to define the time that procrun waits for service to exit,
         but INFINITE timeout was using instead.
       </action>
       <action type="fix" dev="ggregory" due-to="Arturo Bernal">
-        Minor improvements #22, #31.
+        Minor improvements to Java code #22, #31.
       </action>
       <action type="fix" dev="mturk">
         Procrun. Minor improvement that allows to have WINVER nmake variable
         directly defined at compile time as ABI version in hexadecimal format.
       </action>
       <action type="fix" dev="ggregory" due-to="Gary Gregory">
-        Log at Trace instead of Debug when a service reports its state from the prunsrv app.
+        Procrun. Log at Trace instead of Debug when a service reports its state from the prunsrv app.
         This avoids the Debug log filling up as it adds two events per minute. 
         You can then stay in Debug logging to capture register, start, stop, and unregister Debug events.
       </action>
       <action type="fix" dev="ggregory" due-to="Gary Gregory">
-        Miscellaneous logging improvements.
+        Procrun. Miscellaneous logging improvements.
       </action>      
       <action type="fix" dev="ggregory" due-to="Gary Gregory">
-        Log the prunsrv function names at the Trace level.
-      </action>      
+        Procrun. Log the prunsrv function names at the Trace level.
+      </action>
       <!-- ADD -->
       <action type="add" dev="ggregory" due-to="John Patrick">
         Enable Dependabot #20.
       </action>
       <action type="add" dev="ggregory" due-to="Gary Gregory">
-        reportServiceStatusE() shows scale of dwWaitHint as millisecond in logging.
+        Procrun. reportServiceStatusE() shows scale of dwWaitHint as millisecond in logging.
       </action>
       <action type="add" dev="ggregory" due-to="Gary Gregory">
-        reportServiceStatusE() shows a short description for dwCurrentState in logging.
+        Procrun. reportServiceStatusE() shows a short description for dwCurrentState in logging.
       </action>
       <action type="add" dev="ggregory" due-to="Gary Gregory">
-        Add support for a new log level called Trace, lower-level than Debug.
+        Procrun. Add support for a new log level called Trace, lower-level than Debug.
       </action>
       <action type="add" dev="ggregory" due-to="Gary Gregory">
-        Add logging when failing to obtain a service's description from the registry.
+        Procrun. Add logging when failing to obtain a service's description from the registry.
       </action>      
       <action type="add" dev="ggregory" due-to="Gary Gregory">
-        Add logging when failing to set the options of a service.
+        Procrun. Add logging when failing to set the options of a service.
       </action>      
       <!-- -UPDATE -->
       <action type="update" dev="ggregory" due-to="Dependabot">