X-Git-Url: https://code.citadel.org/?a=blobdiff_plain;f=citadel%2Fserver_main.c;h=4e6ca9627af2991945c3de394bf4c6e22b35afae;hb=HEAD;hp=d1b2a4cd3cb4c9edb8f5915adb2bc1d50e08f9c4;hpb=4f38cc33214eb2c4aefdf35cbf3d4e3e121e9daf;p=citadel.git diff --git a/citadel/server_main.c b/citadel/server_main.c deleted file mode 100644 index d1b2a4cd3..000000000 --- a/citadel/server_main.c +++ /dev/null @@ -1,375 +0,0 @@ -/* - * citserver's main() function lives here. - * - * Copyright (c) 1987-2011 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 as published by - * the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * 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. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - */ - -#include "sysdep.h" -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#if TIME_WITH_SYS_TIME -# include -# include -#else -# if HAVE_SYS_TIME_H -# include -# else -# include -# endif -#endif - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#ifdef HAVE_SYS_PRCTL_H -#include -#endif -#include -#include "citadel.h" -#include "server.h" -#include "serv_extensions.h" -#include "sysdep_decls.h" -#include "threads.h" -#include "citserver.h" -#include "support.h" -#include "config.h" -#include "control.h" -#include "database.h" -#include "user_ops.h" -#include "housekeeping.h" -#include "svn_revision.h" -#include "citadel_dirs.h" - -#include "context.h" - -#include "modules_init.h" -#include "ecrash.h" - -#ifdef HAVE_SYS_SELECT_H -#include -#endif - -#ifndef HAVE_SNPRINTF -#include "snprintf.h" -#endif -const char *CitadelServiceUDS="citadel-UDS"; -const char *CitadelServiceTCP="citadel-TCP"; - - - -void go_threading(void); - -/* - * Here's where it all begins. - */ -int main(int argc, char **argv) -{ - char facility[32]; - int a; /* General-purpose variables */ - struct passwd pw, *pwp = NULL; - char pwbuf[SIZ]; - int drop_root_perms = 1; - int relh=0; - int home=0; - int dbg=0; - char relhome[PATH_MAX]=""; - char ctdldir[PATH_MAX]=CTDLDIR; - int syslog_facility = LOG_DAEMON; -#ifdef HAVE_RUN_DIR - struct stat filestats; -#endif -#ifdef HAVE_BACKTRACE - eCrashParameters params; -// eCrashSymbolTable symbol_table; -#endif - - /* initialize the master context */ - InitializeMasterCC(); - InitializeMasterTSD(); - - /* parse command-line arguments */ - for (a=1; a