Skip to content

Commit

Permalink
fixup! cygthread: suspend thread before terminating.
Browse files Browse the repository at this point in the history
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 <johannes.schindelin@gmx.de>
  • Loading branch information
jeremyd2019 authored and dscho committed Nov 14, 2024
1 parent bf47028 commit 54a7252
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions winsup/cygwin/pinfo.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1262,13 +1262,14 @@ proc_waiter (void *arg)

for (;;)
{
DWORD nb;
DWORD nb, err;
char buf = '\0';

if (!ReadFile (vchild.rd_proc_pipe, &buf, 1, &nb, NULL)
&& GetLastError () != ERROR_BROKEN_PIPE)
&& (err = GetLastError ()) != ERROR_BROKEN_PIPE)
{
system_printf ("error on read of child wait pipe %p, %E", vchild.rd_proc_pipe);
if (err != ERROR_OPERATION_ABORTED)
system_printf ("error on read of child wait pipe %p, %E", vchild.rd_proc_pipe);
break;
}

Expand Down

0 comments on commit 54a7252

Please sign in to comment.