mirror of
https://github.com/etlegacy/Update-Installer.git
synced 2025-02-17 00:41:11 +00:00
Log process ID of child processes launched by ProcessUtils::runAsync()
This commit is contained in:
parent
1ce064a686
commit
7c7428a4af
1 changed files with 6 additions and 1 deletions
|
@ -189,7 +189,8 @@ void ProcessUtils::runElevatedWindows(const std::string& executable,
|
||||||
void ProcessUtils::runAsyncUnix(const std::string& executable,
|
void ProcessUtils::runAsyncUnix(const std::string& executable,
|
||||||
const std::list<std::string>& args)
|
const std::list<std::string>& args)
|
||||||
{
|
{
|
||||||
if (fork() == 0)
|
pid_t child = fork();
|
||||||
|
if (child == 0)
|
||||||
{
|
{
|
||||||
// in child process
|
// in child process
|
||||||
char** argBuffer = new char*[args.size() + 1];
|
char** argBuffer = new char*[args.size() + 1];
|
||||||
|
@ -208,6 +209,10 @@ void ProcessUtils::runAsyncUnix(const std::string& executable,
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
LOG(Info,"Started child process " + intToStr(child));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue