diff options
author | Adam <Adam@anope.org> | 2011-11-08 17:29:16 -0500 |
---|---|---|
committer | Adam <Adam@anope.org> | 2011-11-08 17:29:16 -0500 |
commit | b5ff856f47d8e54d12c568462a06351633c29610 (patch) | |
tree | a4e2f96c59ee49aa5e6cacdfd30db6155151ad36 /src/init.cpp | |
parent | 97b9055f92f21cd91af44a3d5dacce0024536cff (diff) |
Windows
Diffstat (limited to 'src/init.cpp')
-rw-r--r-- | src/init.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/init.cpp b/src/init.cpp index 4c4d3f93e..d54ad7fa5 100644 --- a/src/init.cpp +++ b/src/init.cpp @@ -161,7 +161,11 @@ static void write_pidfile() FILE *pidfile = fopen(Config->PIDFilename.c_str(), "w"); if (pidfile) { +#ifdef _WIN32 + fprintf(pidfile, "%d\n", static_cast<int>(GetCurrentProcessId())); +#else fprintf(pidfile, "%d\n", static_cast<int>(getpid())); +#endif fclose(pidfile); atexit(remove_pidfile); } @@ -458,10 +462,6 @@ void Init(int ac, char **av) rand_init(); add_entropy_userkeys(); -#ifdef _WIN32 - OnStartup(); -#endif - /* load modules */ Log() << "Loading modules..."; for (std::list<Anope::string>::iterator it = Config->ModulesAutoLoad.begin(), it_end = Config->ModulesAutoLoad.end(); it != it_end; ++it) |