Fix argv[0] not being correctly set to binary path under Windows

Add the executable to the start of the command line for the new process in ProcessUtils::runAsync()
This commit is contained in:
Robert Knight 2011-08-22 19:17:35 +01:00
parent 66a6afcb01
commit 7c62b4c7af
2 changed files with 2 additions and 1 deletions

View file

@ -310,7 +310,7 @@ int ProcessUtils::runAsyncUnix(const std::string& executable,
void ProcessUtils::runAsyncWindows(const std::string& executable,
const std::list<std::string>& args)
{
std::string commandLine;
std::string commandLine = executable;
for (std::list<std::string>::const_iterator iter = args.begin(); iter != args.end(); iter++)
{
if (!commandLine.empty())

View file

@ -3,6 +3,7 @@
#include "Log.h"
#include "AnyOption/anyoption.h"
#include "Platform.h"
#include "StringUtils.h"
#include <cstdlib>
#include <iostream>