BIG deep clean

This commit is contained in:
2020-06-10 13:14:16 +03:00
parent f579718e0b
commit c59579d5d5
222 changed files with 2392 additions and 11600 deletions

View File

@@ -77,7 +77,6 @@ void PIProcess::startProc(bool detached) {
/// arguments convertion
#ifdef WINDOWS
int as = 0;
//args.pop_front();
piForeachC (PIString & i, args)
as += i.lengthAscii() + 3;
char * a = new char[as];
@@ -120,17 +119,14 @@ void PIProcess::startProc(bool detached) {
f_in.openTemporary(PIIODevice::ReadWrite);
t_in = true;
}
//f_in.open(PIIODevice::ReadWrite); f_in.close();
if (f_out.path().isEmpty()) {
f_out.openTemporary(PIIODevice::ReadWrite);
t_out = true;
}
//f_out.open(PIIODevice::WriteOnly); f_out.close();
if (f_err.path().isEmpty()) {
f_err.openTemporary(PIIODevice::ReadWrite);
t_err = true;
}
//f_err.open(PIIODevice::WriteOnly); f_err.close();
str = args.front();
is_exec = true;
@@ -173,16 +169,6 @@ void PIProcess::startProc(bool detached) {
#else
//cout << "exec " << tf_in << ", " << tf_out << ", " << tf_err << endl;
/*PIStringList clsl;
char * a_ = e[0];
int ai_ = 0;
while (a_) {
piCoutObj << "a_" << PIString(a_);
clsl << PIString(a_);
ai_++;
a_ = e[ai_];
}
piCoutObj << clsl;*/
if (execve(str.data(), a, e) < 0)
piCoutObj << "\"execve" << str << args << "\" error :" << errorString();
} else {
@@ -190,9 +176,6 @@ void PIProcess::startProc(bool detached) {
//cout << "wait" << endl;
if (!detached) {
wait(&exit_code);
/*if (tf_in != 0) fclose(tf_in);
if (tf_out != 0) fclose(tf_out);
if (tf_err != 0) fclose(tf_err);*/
pid_ = 0;
if (!detached) PRIVATE->pid = pid_;
//cout << "wait done" << endl;