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.
  • Loading branch information
jeremyd2019 committed Nov 14, 2024
1 parent e09c64e commit 63686d1
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 63686d1

Please sign in to comment.