summaryrefslogtreecommitdiff
path: root/src/inspircd.cpp
diff options
context:
space:
mode:
authorburlex <burlex@e03df62e-2008-0410-955e-edbf42e46eb7>2007-06-09 23:20:42 +0000
committerburlex <burlex@e03df62e-2008-0410-955e-edbf42e46eb7>2007-06-09 23:20:42 +0000
commitd83f5766b84b12016e15024b48f83a094266845a (patch)
tree210d0bd9e603786c69df6bf64dd98368fe58f3fd /src/inspircd.cpp
parent68531a8197d57177ce8c4a674b5213d2360ad283 (diff)
- Removed un-needed event create at windows fork.
* Fixed command line arguments when using fork under windows. git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@7266 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/inspircd.cpp')
-rw-r--r--src/inspircd.cpp11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/inspircd.cpp b/src/inspircd.cpp
index 43045f876..dee4ece10 100644
--- a/src/inspircd.cpp
+++ b/src/inspircd.cpp
@@ -50,7 +50,11 @@ DWORD WindowsForkStart(InspIRCd * Instance)
// Build the command line arguments.
string command_line;
for(int i = 0; i < Instance->Config->argc; ++i)
+ {
command_line += Instance->Config->argv[i];
+ if(Instance->Config->argc != i+1)
+ command_line += " ";
+ }
char module[MAX_PATH];
if(!GetModuleFileName(NULL, module, MAX_PATH))
@@ -64,13 +68,8 @@ DWORD WindowsForkStart(InspIRCd * Instance)
// Fill in the startup info struct
GetStartupInfo(&startupinfo);
- // Create the "startup" event
- HANDLE fork_event = CreateEvent(0, TRUE, FALSE, "InspStartup");
- if(!fork_event)
- return false;
-
// Launch our "forked" process.
- BOOL bSuccess = CreateProcess ( module, NULL,
+ BOOL bSuccess = CreateProcess ( module, (LPTSTR)command_line.c_str(),
0, // PROCESS_SECURITY_ATTRIBUTES
0, // THREAD_SECURITY_ATTRIBUTES
TRUE, // We went to inherit handles.