mirror of
https://github.com/etlegacy/Update-Installer.git
synced 2025-02-22 11:01:10 +00:00
Display a more helpful error message if waitpid() fails in ProcessUtils::waitForProcess()
This commit is contained in:
parent
ceb3b7d6a0
commit
8df91a76eb
1 changed files with 3 additions and 1 deletions
|
@ -4,6 +4,8 @@
|
|||
#include "StringUtils.h"
|
||||
#include "Log.h"
|
||||
|
||||
#include <string.h>
|
||||
|
||||
#ifdef PLATFORM_WINDOWS
|
||||
#include <windows.h>
|
||||
#else
|
||||
|
@ -40,7 +42,7 @@ bool ProcessUtils::waitForProcess(long long pid)
|
|||
pid_t result = ::waitpid(static_cast<pid_t>(pid), 0, 0);
|
||||
if (result < 0)
|
||||
{
|
||||
LOG(Error,"waitpid() failed with error" + intToStr(errno));
|
||||
LOG(Error,"waitpid() failed with error: " + std::string(strerror(errno)));
|
||||
}
|
||||
return result > 0;
|
||||
#elif defined(PLATFORM_WINDOWS)
|
||||
|
|
Loading…
Reference in a new issue