Log process ID of child processes launched by ProcessUtils::runAsync()

This commit is contained in:
Robert Knight 2011-08-21 23:03:49 +01:00
parent 1ce064a686
commit 7c7428a4af

View file

@ -189,7 +189,8 @@ void ProcessUtils::runElevatedWindows(const std::string& executable,
void ProcessUtils::runAsyncUnix(const std::string& executable,
const std::list<std::string>& args)
{
if (fork() == 0)
pid_t child = fork();
if (child == 0)
{
// in child process
char** argBuffer = new char*[args.size() + 1];
@ -208,6 +209,10 @@ void ProcessUtils::runAsyncUnix(const std::string& executable,
exit(1);
}
}
else
{
LOG(Info,"Started child process " + intToStr(child));
}
}
#endif