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 2010/10/02 14:17:05 UTC
svn commit: r1003782 - in /commons/proper/daemon/trunk: RELEASE-NOTES.txt
src/native/windows/apps/prunsrv/prunsrv.c
Author: mturk
Date: Sat Oct 2 12:17:05 2010
New Revision: 1003782
URL: http://svn.apache.org/viewvc?rev=1003782&view=rev
Log:
DAEMON-175: Display eixt code descriptions in log and console if not in service mode
Modified:
commons/proper/daemon/trunk/RELEASE-NOTES.txt
commons/proper/daemon/trunk/src/native/windows/apps/prunsrv/prunsrv.c
Modified: commons/proper/daemon/trunk/RELEASE-NOTES.txt
URL: http://svn.apache.org/viewvc/commons/proper/daemon/trunk/RELEASE-NOTES.txt?rev=1003782&r1=1003781&r2=1003782&view=diff
==============================================================================
--- commons/proper/daemon/trunk/RELEASE-NOTES.txt (original)
+++ commons/proper/daemon/trunk/RELEASE-NOTES.txt Sat Oct 2 12:17:05 2010
@@ -46,7 +46,7 @@ NEW FEATURES:
BUG FIXES:
-1.0.4: DAEMON-95, DAEMON-171, DAEMON-100, DAEMON-164, DAEMON-165
+1.0.4: DAEMON-95, DAEMON-171, DAEMON-100, DAEMON-164, DAEMON-165, DAEMON-175
1.0.3: DAEMON-108, DAEMON-128, DAEMON-139, DAEMON-143, DAEMON-148,
DAEMON-135, DAEMON-155, DAEMON-159, DAEMON-161, DAEMON-145, DAEMON-146,
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=1003782&r1=1003781&r2=1003782&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 Sat Oct 2 12:17:05 2010
@@ -1394,6 +1394,19 @@ BOOL docmdRunService(LPAPXCMDLINE lpCmdl
return rv;
}
+static const char *gSzProc[] = {
+ "",
+ "parse command line arguments",
+ "load configuration",
+ "run service as console application",
+ "run service",
+ "stop service",
+ "update service parameters",
+ "install service",
+ "delete service",
+ NULL
+};
+
void __cdecl main(int argc, char **argv)
{
UINT rv = 0;
@@ -1499,9 +1512,18 @@ void __cdecl main(int argc, char **argv)
}
cleanup:
- if (rv)
+ if (rv) {
+ int ipx = 0;
+ if (rv > 0 && rv < 7)
+ ipx = rv;
apxLogWrite(APXLOG_MARK_ERROR "Commons Daemon procrun failed "
- "with exit value: %d", rv);
+ "with exit value: %d (Failed to %s)",
+ rv, gSzProc[ipx]);
+ if (ipx && !_service_mode) {
+ /* Print something to the user console */
+ apxDisplayError(FALSE, NULL, 0, "Failed to %s", gSzProc[ipx]);
+ }
+ }
else
apxLogWrite(APXLOG_MARK_INFO "Commons Daemon procrun finished");
if (lpCmdline)