diff options
author | blacksirius <blacksirius@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2012-06-01 14:21:02 +0000 |
---|---|---|
committer | blacksirius <blacksirius@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2012-06-01 14:21:02 +0000 |
commit | 18ac48230ab17ee05ed4b717d858a20879f851f9 (patch) | |
tree | b30e993c0a14a09fe70586570a97ed7d2a90a21c /src/plugins/pid.c | |
parent | 673164238ca72b5d90c6ad0df00f509d339a0621 (diff) | |
download | hercules-18ac48230ab17ee05ed4b717d858a20879f851f9.tar.gz hercules-18ac48230ab17ee05ed4b717d858a20879f851f9.tar.bz2 hercules-18ac48230ab17ee05ed4b717d858a20879f851f9.tar.xz hercules-18ac48230ab17ee05ed4b717d858a20879f851f9.zip |
removed the old obsolete Plugin system (commit 1/2)
- Removed @ Autoconf/make and CMake, VC Projects will be cleaned in a additional commit.
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@16203 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/plugins/pid.c')
-rw-r--r-- | src/plugins/pid.c | 53 |
1 files changed, 0 insertions, 53 deletions
diff --git a/src/plugins/pid.c b/src/plugins/pid.c deleted file mode 100644 index 48013e3eb..000000000 --- a/src/plugins/pid.c +++ /dev/null @@ -1,53 +0,0 @@ - -#include <stdio.h> -#include <string.h> - -#if !defined _WIN32 || defined MINGW - #include <unistd.h> // getpid(), unlink() -#else - #include <windows.h> - #define getpid GetCurrentProcessId -#endif - -#include "../common/plugin.h" - -PLUGIN_INFO = { - "ProcessId", - PLUGIN_ALL, - "1.0", - PLUGIN_VERSION, - "Logs the process ID" -}; - -PLUGIN_EVENTS_TABLE = { - { "pid_create", "Plugin_Init" }, - { "pid_delete", "Plugin_Final" }, - { NULL, NULL } -}; - -char pid_file[256]; -char *server_name; - -void pid_create () -{ - FILE *fp; - int len; - - IMPORT_SYMBOL(server_name, 1); - len = strlen(server_name); - strcpy(pid_file, server_name); - if(len > 4 && pid_file[len - 4] == '.') { - pid_file[len - 4] = 0; - } - strcat(pid_file, ".pid"); - fp = fopen(pid_file, "w"); - if (fp) { - fprintf(fp, "%d", getpid()); - fclose(fp); - } -} - -void pid_delete () -{ - unlink(pid_file); -} |