git-svn-id: svn://db.shs.com.ru/pip@446 12ceb7fc-bf1f-11e4-8940-5bc7170c53b5

This commit is contained in:
2017-04-20 12:16:33 +00:00
parent 6b9b16dbe8
commit 690bec7231
2 changed files with 10 additions and 6 deletions

View File

@@ -172,7 +172,7 @@ void PIProcess::startProc(bool detached) {
#else
//cout << "exec " << tf_in << ", " << tf_out << ", " << tf_err << endl;
PIStringList clsl;
/*PIStringList clsl;
char * a_ = e[0];
int ai_ = 0;
while (a_) {
@@ -181,7 +181,7 @@ void PIProcess::startProc(bool detached) {
ai_++;
a_ = e[ai_];
}
piCoutObj << clsl;
piCoutObj << clsl;*/
if (execve(str.data(), a, e) < 0)
piCoutObj << "\"execve" << str << args << "\" error :" << errorString();
} else {

View File

@@ -337,10 +337,14 @@ int main(int argc, char * argv[]) {
args << "-n" << name;
//PIProcess p;
//p.exec("/bin/readlink", PIStringList() << "/proc/self/exe");
piCout << PIProcess::getEnvironmentVariable("_");
piCout << PIProcess::currentEnvironment();
piCout << "start in background:" << PISystemInfo::instance()->execCommand;// << "; with args" << args;
//PIProcess::execIndependent(PISystemInfo::instance()->execCommand, args);
PIString exe;
#ifdef WINDOWS
exe = PISystemInfo::instance()->execCommand;
#else
exe = PIProcess::getEnvironmentVariable("_");
#endif
piCout << "start in background:" << exe;// << "; with args" << args;
PIProcess::execIndependent(exe, args);
return 0;
}
PIINTROSPECTION_START