From 690bec723105eec17e9ddb4acbbb0058522c04c3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=91=D1=8B=D1=87=D0=BA=D0=BE=D0=B2=20=D0=90=D0=BD=D0=B4?= =?UTF-8?q?=D1=80=D0=B5=D0=B9?= Date: Thu, 20 Apr 2017 12:16:33 +0000 Subject: [PATCH] git-svn-id: svn://db.shs.com.ru/pip@446 12ceb7fc-bf1f-11e4-8940-5bc7170c53b5 --- src_main/system/piprocess.cpp | 4 ++-- utils/system_daemon/main.cpp | 12 ++++++++---- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/src_main/system/piprocess.cpp b/src_main/system/piprocess.cpp index bbcf0822..4993df27 100755 --- a/src_main/system/piprocess.cpp +++ b/src_main/system/piprocess.cpp @@ -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 { diff --git a/utils/system_daemon/main.cpp b/utils/system_daemon/main.cpp index 4adb21f0..8d860ee7 100755 --- a/utils/system_daemon/main.cpp +++ b/utils/system_daemon/main.cpp @@ -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