git-svn-id: svn://db.shs.com.ru/pip@446 12ceb7fc-bf1f-11e4-8940-5bc7170c53b5
This commit is contained in:
@@ -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 {
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user