diff options
author | Ben Longbons <b.r.longbons@gmail.com> | 2012-08-30 17:37:27 -0700 |
---|---|---|
committer | Ben Longbons <b.r.longbons@gmail.com> | 2012-09-03 16:23:10 -0700 |
commit | 31544d2b6973931be7fdec898ea3672bea831de2 (patch) | |
tree | dcf946429b406f39297404be662b0a840094e477 /src/tool | |
parent | 41974ae5265fbc23a06f276f9e008d5dad020e0b (diff) | |
download | tmwa-31544d2b6973931be7fdec898ea3672bea831de2.tar.gz tmwa-31544d2b6973931be7fdec898ea3672bea831de2.tar.bz2 tmwa-31544d2b6973931be7fdec898ea3672bea831de2.tar.xz tmwa-31544d2b6973931be7fdec898ea3672bea831de2.zip |
Fix compiler errors of C++ conversion
Diffstat (limited to 'src/tool')
-rw-r--r-- | src/tool/GNUmakefile | 4 | ||||
-rw-r--r-- | src/tool/eathena-monitor.cpp | 5 |
2 files changed, 7 insertions, 2 deletions
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); |