mirror of
https://github.com/decompals/wibo.git
synced 2025-12-12 06:45:05 +00:00
Initial macOS support (x86_64 with Rosetta 2)
This commit is contained in:
@@ -437,10 +437,13 @@ DWORD WINAPI WaitForSingleObject(HANDLE hHandle, DWORD dwMilliseconds) {
|
||||
case ObjectType::Process: {
|
||||
auto po = std::move(obj).downcast<ProcessObject>();
|
||||
std::unique_lock lk(po->m);
|
||||
if (po->pidfd == -1) {
|
||||
if (!po->signaled && !po->waitable) {
|
||||
// Windows actually allows you to wait on your own process, but why bother?
|
||||
return WAIT_TIMEOUT;
|
||||
}
|
||||
if (po->signaled) {
|
||||
return WAIT_OBJECT_0;
|
||||
}
|
||||
bool ok = doWait(lk, po->cv, [&] { return po->signaled; });
|
||||
return ok ? WAIT_OBJECT_0 : WAIT_TIMEOUT;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user