From: Tobias Stoeckmann Date: Mon, 2 Jun 2025 21:21:26 +0000 (+0200) Subject: windows: Preserve GetExitCodeProcess error X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=d7d1d19bb63ac9e234927dda420f17c37b76948f;p=thirdparty%2Flibarchive.git windows: Preserve GetExitCodeProcess error If the waitpid version for Windows fails, preserve the error code and avoid overwriting it with a possible CloseHandle error. Signed-off-by: Tobias Stoeckmann --- diff --git a/libarchive/archive_windows.c b/libarchive/archive_windows.c index 03c9736c0..349114a61 100644 --- a/libarchive/archive_windows.c +++ b/libarchive/archive_windows.c @@ -641,8 +641,8 @@ __la_waitpid(HANDLE child, int *status, int option) (void)option;/* UNUSED */ do { if (GetExitCodeProcess(child, &cs) == 0) { - CloseHandle(child); la_dosmaperr(GetLastError()); + CloseHandle(child); *status = 0; return (-1); }