daemon.cc File Reference

#include <unistd.h>
#include <sys/wait.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <ctype.h>
#include <fstream>
#include <iostream>
#include <string>
#include <cstring>
#include <cstdlib>
#include <cerrno>
#include "config.h"
#include "ServerExitConditions.h"
#include "BESServerUtils.h"
#include "BESScrub.h"

Include dependency graph for daemon.cc:

Go to the source code of this file.

Defines

#define BES_SERVER   "/beslistener"
#define BES_SERVER_PID   "/bes.pid"
#define BES_SERVER_ROOT   "BES_SERVER_ROOT"

Functions

int daemon_init ()
bool load_names (const string &install_dir, const string &pid_dir)
int main (int argc, char *argv[])
int mount_server (char **)
int pr_exit (int status)
void store_listener_id (int pid)

Variables

char ** arguments = 0
string file_for_listener
string NameProgram
string server_name


Define Documentation

#define BES_SERVER   "/beslistener"

Definition at line 60 of file daemon.cc.

Referenced by load_names().

#define BES_SERVER_PID   "/bes.pid"

Definition at line 61 of file daemon.cc.

Referenced by load_names().

#define BES_SERVER_ROOT   "BES_SERVER_ROOT"

Definition at line 59 of file daemon.cc.

Referenced by load_names().


Function Documentation

int daemon_init (  ) 

Definition at line 280 of file daemon.cc.

Referenced by main().

bool load_names ( const string &  install_dir,
const string &  pid_dir 
)

Definition at line 423 of file daemon.cc.

References BES_SERVER, BES_SERVER_PID, BES_SERVER_ROOT, file_for_listener, NameProgram, and server_name.

Referenced by main().

int main ( int  argc,
char *  argv[] 
)

Definition at line 78 of file daemon.cc.

References arguments, BESScrub::command_line_arg_ok(), daemon_init(), file_for_listener, load_names(), mount_server(), NameProgram, BESScrub::pathname_ok(), SERVER_EXIT_FATAL_CAN_NOT_START, server_name, BESServerUtils::show_usage(), BESServerUtils::show_version(), and BESScrub::size_ok().

Here is the call graph for this function:

int mount_server ( char **   ) 

Definition at line 292 of file daemon.cc.

References NameProgram, pr_exit(), and store_listener_id().

Referenced by main().

Here is the call graph for this function:

int pr_exit ( int  status  ) 

Definition at line 332 of file daemon.cc.

References NameProgram, SERVER_EXIT_ABNORMAL_TERMINATION, SERVER_EXIT_FATAL_CAN_NOT_START, SERVER_EXIT_NORMAL_SHUTDOWN, SERVER_EXIT_RESTART, and SERVER_EXIT_UNDEFINED_STATE.

Referenced by mount_server().

void store_listener_id ( int  pid  ) 

Definition at line 399 of file daemon.cc.

References file_for_listener, and NameProgram.

Referenced by mount_server().


Variable Documentation

char** arguments = 0

Definition at line 75 of file daemon.cc.

Referenced by main().

string file_for_listener

Definition at line 73 of file daemon.cc.

Referenced by load_names(), main(), and store_listener_id().

string NameProgram

Definition at line 69 of file daemon.cc.

Referenced by load_names(), main(), mount_server(), pr_exit(), and store_listener_id().

string server_name

Definition at line 72 of file daemon.cc.

Referenced by load_names(), and main().


Generated on Thu Sep 16 15:22:14 2010 for OPeNDAP Hyrax Back End Server (BES) by  doxygen 1.4.7