Cygwin: FIFO: avoid hang after exec
Define fhandler:fifo::fixup_after_exec, which sets listen_client_thr and lct_termination_evt to NULL. This forces the listen_client thread to restart on the first attempt to read after an exec. Previously the exec'd process could hang in fhandler_fifo::raw_read.
This commit is contained in:
committed by
Corinna Vinschen
parent
f811485ffb
commit
230c5df2df
@ -942,6 +942,15 @@ fhandler_fifo::fixup_after_fork (HANDLE parent)
|
||||
fifo_client_unlock ();
|
||||
}
|
||||
|
||||
void
|
||||
fhandler_fifo::fixup_after_exec ()
|
||||
{
|
||||
fhandler_base::fixup_after_exec ();
|
||||
listen_client_thr = NULL;
|
||||
lct_termination_evt = NULL;
|
||||
fifo_client_unlock ();
|
||||
}
|
||||
|
||||
void
|
||||
fhandler_fifo::set_close_on_exec (bool val)
|
||||
{
|
||||
|
Reference in New Issue
Block a user