Removed the backtrace stuff. It wasn't producing traces that were useful.
[citadel.git] / citadel / server_main.c
index 753e73a6b0b2e6bd1bf87b36961bd43e402dbc60..4e6ca9627af2991945c3de394bf4c6e22b35afae 100644 (file)
@@ -1,16 +1,15 @@
-/*
- * citserver's main() function lives here.
- * 
- * Copyright (c) 1987-2021 by the citadel.org team
- *
- * This program is open source software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 3.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- */
+// citserver's main() function lives here.
+// 
+// Copyright (c) 1987-2021 by the citadel.org team
+//
+// This program is open source software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License version 3.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
 #include <stdlib.h>
 #include <unistd.h>
 #include <stdio.h>
@@ -69,9 +68,8 @@ void ctdl_lockfile(int op) {
  */
 int main(int argc, char **argv) {
 
-       size_t basesize = 64;
        char facility[32];
-       int a;                  /* General-purpose variables */
+       int a;                  // General-purpose variables
        struct passwd pw, *pwp = NULL;
        char pwbuf[SIZ];
        int drop_root_perms = 1;
@@ -135,9 +133,8 @@ int main(int argc, char **argv) {
                case 't':
                        break;
 
-               // basesize (passed to libcitadel)
+               // deprecated
                 case 'B':
-                        basesize = atoi(optarg);
                         break;
 
                // deprecated
@@ -187,6 +184,7 @@ int main(int argc, char **argv) {
 
        if (chdir(ctdldir) != 0) {
                syslog(LOG_ERR, "main: unable to change directory to [%s]: %m", ctdldir);
+               exit(CTDLEXIT_HOME);
        }
        else {
                syslog(LOG_INFO, "main: running in data directory %s", ctdldir);
@@ -218,7 +216,6 @@ int main(int argc, char **argv) {
        InitializeMasterCC();
        InitializeMasterTSD();
 
-       StartLibCitadel(basesize);
        setlogmask(LOG_UPTO(max_log_level));
        openlog("citserver",
                ( running_as_daemon ? (LOG_PID) : (LOG_PID | LOG_PERROR) ),