mirror of
https://github.com/etlegacy/Update-Installer.git
synced 2025-02-23 11:31:05 +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 "StringUtils.h"
|
||||||
#include "Log.h"
|
#include "Log.h"
|
||||||
|
|
||||||
|
#include <string.h>
|
||||||
|
|
||||||
#ifdef PLATFORM_WINDOWS
|
#ifdef PLATFORM_WINDOWS
|
||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
#else
|
#else
|
||||||
|
@ -40,7 +42,7 @@ bool ProcessUtils::waitForProcess(long long pid)
|
||||||
pid_t result = ::waitpid(static_cast<pid_t>(pid), 0, 0);
|
pid_t result = ::waitpid(static_cast<pid_t>(pid), 0, 0);
|
||||||
if (result < 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;
|
return result > 0;
|
||||||
#elif defined(PLATFORM_WINDOWS)
|
#elif defined(PLATFORM_WINDOWS)
|
||||||
|
|
Loading…
Reference in a new issue