myserver-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[myserver-commit] [SCM] GNU MyServer branch, master, updated. 0_9_2-21-g


From: Giuseppe Scrivano
Subject: [myserver-commit] [SCM] GNU MyServer branch, master, updated. 0_9_2-21-g34fa5e7
Date: Sat, 20 Feb 2010 22:33:21 +0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU MyServer".

The branch, master has been updated
       via  34fa5e73198b1f438024676e3e78a8adf59a6d4b (commit)
      from  59bb686116a92c5120388c2c08c6289e67dd49f1 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------


commit 34fa5e73198b1f438024676e3e78a8adf59a6d4b
Author: Giuseppe Scrivano <address@hidden>
Date:   Sat Feb 20 22:44:52 2010 +0100

    Print to stderr the exception catched by `main'.

diff --git a/myserver/src/myserver.cpp b/myserver/src/myserver.cpp
index da22a61..decc1a6 100644
--- a/myserver/src/myserver.cpp
+++ b/myserver/src/myserver.cpp
@@ -341,7 +341,7 @@ static MainConfiguration *genMainConf (Server *server, 
const char *arg)
 
 const char *program_name = NULL;
 
-int main  (int argn, char **argv)
+int main (int argn, char **argv)
 {
   program_name = argv[0];
   int runas = MYSERVER_RUNAS_CONSOLE;
@@ -365,10 +365,14 @@ int main  (int argn, char **argv)
     {
       Server::createInstance ();
     }
+  catch (exception & e)
+    {
+      cerr << e.what () << endl;
+      return 1;
+    }
   catch (...)
     {
-      /* Die if we get exceptions here.  */
-      return (1);
+      return 1;
     };
 
   u_int pathLen = 0;
@@ -435,6 +439,7 @@ int main  (int argn, char **argv)
            << "http://www.gnu.org/software/myserver"; << endl;
       return 0;
     }
+
   if (input.useForkServer)
     {
       FilesUtility::resetTmpPath ();
@@ -446,13 +451,15 @@ int main  (int argn, char **argv)
    */
   try
     {
-      if (loadConfFilesLocation (mainConf, mimeConf, vhostConf, externPath,
+      const char *confFileDir;
 #ifdef WIN32
-                                 "."
+      confFileDir = ".";
 #else
-                                 input.confFilesLocation
+      confFileDir = input.confFilesLocation;
 #endif
-                                 ))
+
+      if (loadConfFilesLocation (mainConf, mimeConf, vhostConf, externPath,
+                                 confFileDir))
         {
           cout << _("Cannot find the configuration files, be sure they exist")
                << endl;
@@ -476,9 +483,7 @@ int main  (int argn, char **argv)
            * An error happened, return with errors.
            */
           if (pid < 0)
-            {
-              return 1;
-            }
+            return 1;
 
           if (pid)
             {
@@ -488,6 +493,7 @@ int main  (int argn, char **argv)
                 writePidfile ();
               return 0;
             }
+
           /*
            * Create a SID for the new process.
            */

-----------------------------------------------------------------------

Summary of changes:
 myserver/src/myserver.cpp |   26 ++++++++++++++++----------
 1 files changed, 16 insertions(+), 10 deletions(-)


hooks/post-receive
-- 
GNU MyServer




reply via email to

[Prev in Thread] Current Thread [Next in Thread]