]> git.pond.sub.org Git - empserver/commitdiff
Make utility programs abort on internal error
authorMarkus Armbruster <armbru@pond.sub.org>
Sun, 3 Feb 2008 12:22:34 +0000 (13:22 +0100)
committerMarkus Armbruster <armbru@pond.sub.org>
Thu, 7 Feb 2008 07:01:53 +0000 (08:01 +0100)
Until now, they tried to recover and continue (debug off).  That's
appropriate only for the server.  The server could be told to abort
instead (debug on, selected by option -d), but not the utility
programs.

Change debug to be on by default, and switch it off early in the
server's main().  No functional change for the server.

src/lib/gen/log.c
src/server/main.c

index 1a49c0d3d5f2c3075a072f730485771c3b4a6a03..4196bcd06e9976fd27554601d4ab53d0eb0f9704 100644 (file)
@@ -46,7 +46,7 @@
 #include "prototypes.h"
 
 /* Debugging?  If yes call abort() on internal error.  */
-int debug = 0;
+int debug = 1;
 
 static char logfile[32];
 static int logfd = -1;
index b7d79eea5e6bb7949d54fb13e1484078c6bfa373..20d1a264570518109291a1e2af92a8994f1673d4 100644 (file)
@@ -133,6 +133,8 @@ main(int argc, char **argv)
     int op, sig;
     unsigned seed = time(NULL);
 
+    debug = 0;
+
 #ifdef _WIN32
 # define XOPTS "iI:uU:"
 #else