// process still/already running...
return false;
}
+
+ Utils::FileStat stat(m_path);
+ if (! stat.is_exec_file())
+ {
+ // command to execute does not exist or is not executable
+ return false;
+ }
+
m_exit_code= 0;
if (stderr == _StderrOnStdout)
if (r !=0 )
{
//TODO?
- exit(255);
+ _exit(255);
}
}
// execute:
execv(m_path.c_str(), argv);
// exit if exec failed
- exit(255);
+ _exit(255);
//cleanup! ... just joking; we exec or we exit, in either case the system cleans
// everything which needs to be cleaned up.
+ // Using _exit instead of exit, it will not clean up the clone of parent's memory
+ // in case of failure to exec m_path
}
return false; // keep the compiler happy...
} // eo ProcessImplementation::startProcess()