From f5be089c4ac71b71af4bd5e936935d86c33894d4 Mon Sep 17 00:00:00 2001 From: brain Date: Mon, 11 Jun 2007 21:51:22 +0000 Subject: 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 --- src/inspircd.cpp | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'src') 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; } -- cgit v1.2.3