#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_ROOT "BES_SERVER_ROOT" |
#define | BES_SERVER "/beslistener" |
#define | BES_SERVER_PID "/bes.pid" |
Functions | |
int | daemon_init () |
int | mount_server (char **) |
int | pr_exit (int status) |
void | store_listener_id (int pid) |
bool | load_names (const string &install_dir, const string &pid_dir) |
int | main (int argc, char *argv[]) |
Variables | |
string | NameProgram |
string | server_name |
string | file_for_listener |
char ** | arguments = 0 |
#define BES_SERVER "/beslistener" |
#define BES_SERVER_PID "/bes.pid" |
#define BES_SERVER_ROOT "BES_SERVER_ROOT" |
bool load_names | ( | const string & | install_dir, | |
const string & | pid_dir | |||
) |
Definition at line 424 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 293 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 333 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 400 of file daemon.cc.
References file_for_listener, and NameProgram.
Referenced by mount_server().
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 |