From: Dustin L. Howett Date: Wed, 7 Jan 2026 21:42:41 +0000 (-0800) Subject: Revert "Wait for the process instead of busy wait loop" X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=dea03d6e00a81ca67550d9c6e9b3fe14b6a82df0;p=thirdparty%2Flibarchive.git Revert "Wait for the process instead of busy wait loop" --- diff --git a/libarchive/archive_windows.c b/libarchive/archive_windows.c index 6cc36225b..3fbea6c5b 100644 --- a/libarchive/archive_windows.c +++ b/libarchive/archive_windows.c @@ -779,18 +779,16 @@ pid_t __la_waitpid(HANDLE child, int *status, int option) { DWORD cs; - DWORD wait_result; - (void)option; /* UNUSED */ - wait_result = WaitForSingleObject(child, INFINITE); - if (wait_result != WAIT_OBJECT_0 || - GetExitCodeProcess(child, &cs) == 0) - { - la_dosmaperr(GetLastError()); - CloseHandle(child); - *status = 0; - return (-1); - } + (void)option;/* UNUSED */ + do { + if (GetExitCodeProcess(child, &cs) == 0) { + la_dosmaperr(GetLastError()); + CloseHandle(child); + *status = 0; + return (-1); + } + } while (cs == STILL_ACTIVE); CloseHandle(child); *status = (int)(cs & 0xff);