Changeset 2659
- Timestamp:
- 08/03/2010 21:30:42 (2 years ago)
- Location:
- box/RELEASE/0.11rc7/lib/server
- Files:
-
- 2 edited
-
LocalProcessStream.cpp (modified) (4 diffs)
-
LocalProcessStream.h (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
box/RELEASE/0.11rc7/lib/server/LocalProcessStream.cpp
r1822 r2659 44 44 // 45 45 // -------------------------------------------------------------------------- 46 std::auto_ptr<IOStream> LocalProcessStream(const char *CommandLine, pid_t &rPidOut) 46 std::auto_ptr<IOStream> LocalProcessStream(const std::string& rCommandLine, 47 pid_t &rPidOut) 47 48 { 48 49 #ifndef WIN32 … … 50 51 // Split up command 51 52 std::vector<std::string> command; 52 SplitString( std::string(CommandLine), ' ', command);53 SplitString(rCommandLine, ' ', command); 53 54 54 55 // Build arguments … … 138 139 startupInfo.dwFlags |= STARTF_USESTDHANDLES; 139 140 140 CHAR* commandLineCopy = (CHAR*)malloc( strlen(CommandLine) + 1);141 strcpy(commandLineCopy, CommandLine);141 CHAR* commandLineCopy = (CHAR*)malloc(rCommandLine.size() + 1); 142 strcpy(commandLineCopy, rCommandLine.c_str()); 142 143 143 144 BOOL result = CreateProcess(NULL, … … 156 157 if(!result) 157 158 { 158 BOX_ERROR("Failed to CreateProcess: '" << CommandLine <<159 BOX_ERROR("Failed to CreateProcess: '" << rCommandLine << 159 160 "': " << GetErrorMessage(GetLastError())); 160 161 CloseHandle(writeInChild); -
box/RELEASE/0.11rc7/lib/server/LocalProcessStream.h
r217 r2659 14 14 #include "IOStream.h" 15 15 16 std::auto_ptr<IOStream> LocalProcessStream(const char *CommandLine, pid_t &rPidOut); 16 std::auto_ptr<IOStream> LocalProcessStream(const std::string& rCommandLine, 17 pid_t &rPidOut); 17 18 18 19 #endif // LOCALPROCESSSTREAM__H
Note: See TracChangeset
for help on using the changeset viewer.
