Skip to content

Commit 54a7252

Browse files
jeremyd2019dscho
authored andcommitted
fixup! cygthread: suspend thread before terminating.
Suppress error output if ReadFile on child wait pipe returns ERROR_OPERATION_ABORTED due to addition of CancelSynchronousIo call. Cherry picked from commit eafd9a22bc (fixup! cygthread: suspend thread before terminating., 2024-11-13) from msys2/msys2-runtime. Signed-off-by: Johannes Schindelin <[email protected]>
1 parent bf47028 commit 54a7252

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

winsup/cygwin/pinfo.cc

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1262,13 +1262,14 @@ proc_waiter (void *arg)
12621262

12631263
for (;;)
12641264
{
1265-
DWORD nb;
1265+
DWORD nb, err;
12661266
char buf = '\0';
12671267

12681268
if (!ReadFile (vchild.rd_proc_pipe, &buf, 1, &nb, NULL)
1269-
&& GetLastError () != ERROR_BROKEN_PIPE)
1269+
&& (err = GetLastError ()) != ERROR_BROKEN_PIPE)
12701270
{
1271-
system_printf ("error on read of child wait pipe %p, %E", vchild.rd_proc_pipe);
1271+
if (err != ERROR_OPERATION_ABORTED)
1272+
system_printf ("error on read of child wait pipe %p, %E", vchild.rd_proc_pipe);
12721273
break;
12731274
}
12741275

0 commit comments

Comments
 (0)