X-Git-Url: https://code.citadel.org/?a=blobdiff_plain;f=citadel%2Fserver_main.c;h=9bd9be89e8ebfd21468f6bc1a95b2ad5f6a61604;hb=HEAD;hp=37c77ddcd4fa8068ba0b16436d089f3d5d21900d;hpb=4784ca02b8038d20477d02e059e753588b3d28a7;p=citadel.git diff --git a/citadel/server_main.c b/citadel/server_main.c deleted file mode 100644 index 37c77ddcd..000000000 --- a/citadel/server_main.c +++ /dev/null @@ -1,353 +0,0 @@ -/* - * citserver's main() function lives here. - * - * $Id$ - */ - -#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.c" - -#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"; - - -extern struct CitContext masterCC; - - -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; - size_t size; - int relh=0; - int home=0; - int dbg=0; - char relhome[PATH_MAX]=""; - char ctdldir[PATH_MAX]=CTDLDIR; -#ifdef HAVE_RUN_DIR - struct stat filestats; -#endif -#ifdef HAVE_BACKTRACE - eCrashParameters params; -// eCrashSymbolTable symbol_table; -#endif - /* initialise semaphores here. Patch by Matt and davew - * its called here as they are needed by CtdlLogPrintf for thread safety - */ - InitialiseSemaphores(); - - /* initialize the master context */ - InitializeMasterCC(); - - /* parse command-line arguments */ - for (a=1; a