Return-Path: Delivered-To: apmail-commons-commits-archive@minotaur.apache.org Received: (qmail 83588 invoked from network); 2 Oct 2010 12:17:31 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 2 Oct 2010 12:17:31 -0000 Received: (qmail 87164 invoked by uid 500); 2 Oct 2010 12:17:31 -0000 Delivered-To: apmail-commons-commits-archive@commons.apache.org Received: (qmail 86806 invoked by uid 500); 2 Oct 2010 12:17:27 -0000 Mailing-List: contact commits-help@commons.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@commons.apache.org Delivered-To: mailing list commits@commons.apache.org Received: (qmail 86798 invoked by uid 99); 2 Oct 2010 12:17:26 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 02 Oct 2010 12:17:26 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 02 Oct 2010 12:17:25 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id A6EBB23889F1; Sat, 2 Oct 2010 12:17:05 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1003782 - in /commons/proper/daemon/trunk: RELEASE-NOTES.txt src/native/windows/apps/prunsrv/prunsrv.c Date: Sat, 02 Oct 2010 12:17:05 -0000 To: commits@commons.apache.org From: mturk@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20101002121705.A6EBB23889F1@eris.apache.org> 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)