Skip to content

Commit

Permalink
hack on wait thread shutdown a bit
Browse files Browse the repository at this point in the history
  • Loading branch information
jeremyd2019 committed May 20, 2024
1 parent a624c49 commit 045127d
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion winsup/cygwin/sigproc.cc
Original file line number Diff line number Diff line change
Expand Up @@ -410,7 +410,12 @@ proc_terminate ()
if (!have_execed || !have_execed_cygwin)
chld_procs[i]->ppid = 1;
if (chld_procs[i].wait_thread)
chld_procs[i].wait_thread->terminate_thread ();
{
if (CancelSynchronousIo (chld_procs[i].wait_thread->thread_handle ()))
chld_procs[i].wait_thread->detach ();
else
chld_procs[i].wait_thread->terminate_thread ();
}
/* Release memory associated with this process unless it is 'myself'.
'myself' is only in the chld_procs table when we've execed. We
reach here when the next process has finished initializing but we
Expand Down

0 comments on commit 045127d

Please sign in to comment.