summaryrefslogtreecommitdiff
path: root/src/plugins/pid.c
diff options
context:
space:
mode:
authorFlavioJS <FlavioJS@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-12-05 13:23:07 +0000
committerFlavioJS <FlavioJS@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-12-05 13:23:07 +0000
commit288490094a7fe9167747dc78d416940759a31197 (patch)
tree53dc4f5c2375f4b688b53ca8841630ddec5e1f88 /src/plugins/pid.c
parent8ec1c47aed09c90343949d57c92760ba84738a46 (diff)
downloadhercules-288490094a7fe9167747dc78d416940759a31197.tar.gz
hercules-288490094a7fe9167747dc78d416940759a31197.tar.bz2
hercules-288490094a7fe9167747dc78d416940759a31197.tar.xz
hercules-288490094a7fe9167747dc78d416940759a31197.zip
- Massive EOL normalization & 'svn:eol-style native' flag setting for all txt/conf/h/c files.
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@9410 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/plugins/pid.c')
-rw-r--r--src/plugins/pid.c108
1 files changed, 54 insertions, 54 deletions
diff --git a/src/plugins/pid.c b/src/plugins/pid.c
index 1ceb49b6f..62eb6878c 100644
--- a/src/plugins/pid.c
+++ b/src/plugins/pid.c
@@ -1,54 +1,54 @@
-
-#include <stdio.h>
-#include <string.h>
-#ifndef _WIN32
- #include <unistd.h>
-#else
- #define getpid GetCurrentProcessId
-#endif
-#ifdef MINGW
- #include <process.h>
- #include <io.h>
-#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);
-}
+
+#include <stdio.h>
+#include <string.h>
+#ifndef _WIN32
+ #include <unistd.h>
+#else
+ #define getpid GetCurrentProcessId
+#endif
+#ifdef MINGW
+ #include <process.h>
+ #include <io.h>
+#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);
+}