src/SubProcess.cpp
branchv_0
changeset 46 b5ae61996281
parent 30 56409232e1a1
child 62 a467e8cbd16b
equal deleted inserted replaced
45:f466b4c7d9b1 46:b5ae61996281
    74 	static void execp(const std::vector<std::string>& args) {
    74 	static void execp(const std::vector<std::string>& args) {
    75 		const char** a = new const char*[args.size() + 1];
    75 		const char** a = new const char*[args.size() + 1];
    76 		for (size_t i = 0; i < args.size(); i++) a[i] = args[i].c_str();
    76 		for (size_t i = 0; i < args.size(); i++) a[i] = args[i].c_str();
    77 		a[args.size()] = nullptr;
    77 		a[args.size()] = nullptr;
    78 
    78 
    79 		execvp(a[0], (char*const*) a);
    79 		execv(a[0], (char*const*) a);
    80 
    80 
    81 		delete[] a;
    81 		delete[] a;
    82 		throw SubProcess::Exception(L"Unable to do execvp().");
    82 		throw SubProcess::Exception(L"Unable to do execvp().");
    83 	}
    83 	}
    84 
    84