diff options
Diffstat (limited to 'src/tool/eathena-monitor.cpp')
-rw-r--r-- | src/tool/eathena-monitor.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/tool/eathena-monitor.cpp b/src/tool/eathena-monitor.cpp index 1b1abd5..e070c8a 100644 --- a/src/tool/eathena-monitor.cpp +++ b/src/tool/eathena-monitor.cpp @@ -73,6 +73,7 @@ const char *config = CONFIG; pid_t pid_login, pid_map, pid_char; +static const char* make_path (const char* base, const char* path) { size_t base_len = strlen(base); size_t path_len = strlen(path); @@ -84,6 +85,7 @@ const char* make_path (const char* base, const char* path) { return out; } +static void parse_option (char *name, char *value) { if (!strcasecmp(name, "login_server")) { login_server = strdup(value); @@ -100,6 +102,7 @@ void parse_option (char *name, char *value) { } } +static void read_config(const char *filename) { FILE *input; char string[1000]; @@ -138,6 +141,7 @@ void read_config(const char *filename) { fclose (input); } +static pid_t start_process(const char *exec) { const char *args[2] = {exec, NULL}; pid_t pid = fork(); @@ -155,6 +159,7 @@ pid_t start_process(const char *exec) { } // Kill all children with the same signal we got, then ourself. +static void stop_process(int sig) { if (pid_map) kill(pid_map, sig); if (pid_login) kill(pid_login, sig); |