diff options
author | burlex <burlex@e03df62e-2008-0410-955e-edbf42e46eb7> | 2007-06-09 23:20:42 +0000 |
---|---|---|
committer | burlex <burlex@e03df62e-2008-0410-955e-edbf42e46eb7> | 2007-06-09 23:20:42 +0000 |
commit | d83f5766b84b12016e15024b48f83a094266845a (patch) | |
tree | 210d0bd9e603786c69df6bf64dd98368fe58f3fd /src | |
parent | 68531a8197d57177ce8c4a674b5213d2360ad283 (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')
-rw-r--r-- | src/inspircd.cpp | 11 |
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. |