From 31544d2b6973931be7fdec898ea3672bea831de2 Mon Sep 17 00:00:00 2001 From: Ben Longbons Date: Thu, 30 Aug 2012 17:37:27 -0700 Subject: Fix compiler errors of C++ conversion --- src/tool/GNUmakefile | 4 ++-- src/tool/eathena-monitor.cpp | 5 +++++ 2 files changed, 7 insertions(+), 2 deletions(-) (limited to 'src/tool') diff --git a/src/tool/GNUmakefile b/src/tool/GNUmakefile index 2efc93b..24ee766 100644 --- a/src/tool/GNUmakefile +++ b/src/tool/GNUmakefile @@ -1,7 +1,7 @@ .SUFFIXES: all: - make -C ../.. tools + ${MAKE} -C ../.. eathena-monitor clean: rm -r ../../obj/tool/ %:: - make -C ../.. obj/tool/$@ + ${MAKE} -C ../.. obj/tool/$@ 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); -- cgit v1.2.3-70-g09d2