diff options
author | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2007-06-11 21:51:22 +0000 |
---|---|---|
committer | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2007-06-11 21:51:22 +0000 |
commit | f5be089c4ac71b71af4bd5e936935d86c33894d4 (patch) | |
tree | 508a0c74c1a2c96d5871151b618c0fd7737af70e | |
parent | fccc2136b8567b0a78afd0e298c36b2defc29497 (diff) |
Fixed commandline stuff for CreateProcess, but it looks like win2k doesnt like that AUTHZ const. Commented it out for now till burlex comes up with a solution
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@7274 e03df62e-2008-0410-955e-edbf42e46eb7
-rw-r--r-- | src/inspircd.cpp | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/src/inspircd.cpp b/src/inspircd.cpp index 3fed0470f..ff51f8644 100644 --- a/src/inspircd.cpp +++ b/src/inspircd.cpp @@ -62,6 +62,10 @@ DWORD WindowsForkStart(InspIRCd * Instance) printf("GetModuleFileName() failed.\n"); return false; } + else + { + printf("Launch '%s' '%s'\n", module, GetCommandLine()); + } STARTUPINFO startupinfo; PROCESS_INFORMATION procinfo; @@ -72,12 +76,12 @@ DWORD WindowsForkStart(InspIRCd * Instance) GetStartupInfo(&startupinfo); // Launch our "forked" process. - BOOL bSuccess = CreateProcess ( module, (LPTSTR)command_line.c_str(), + BOOL bSuccess = CreateProcess ( module, GetCommandLine(), 0, // PROCESS_SECURITY_ATTRIBUTES 0, // THREAD_SECURITY_ATTRIBUTES TRUE, // We went to inherit handles. - CREATE_SUSPENDED | // Suspend the primary thread of the new process - CREATE_PRESERVE_CODE_AUTHZ_LEVEL, // Allow us full access to the process + CREATE_SUSPENDED // Suspend the primary thread of the new process + /*| CREATE_PRESERVE_CODE_AUTHZ_LEVEL*/, // Allow us full access to the process 0, // ENVIRONMENT 0, // CURRENT_DIRECTORY &startupinfo, // startup info @@ -86,6 +90,7 @@ DWORD WindowsForkStart(InspIRCd * Instance) if(!bSuccess) { printf("CreateProcess() failed.\n"); + printf("CreateProcess() %s\n", dlerror()); return false; } |