Cygwin: FIFO: don't read from pipes that are closing
Don't try to read from fifo_client_handlers that are in the fc_closing state. Experiments have shown that this always yields STATUS_PIPE_BROKEN, so it just wastes a Windows system call. Re-order the values in enum fifo_client_connect_state to reflect the new status of fc_closing.
This commit is contained in:
@@ -878,7 +878,7 @@ peek_fifo (select_record *s, bool from_select)
|
||||
{
|
||||
fifo_client_handler &fc = fh->get_fc_handler (i);
|
||||
fc.query_and_set_state ();
|
||||
if (fc.get_state () >= fc_closing)
|
||||
if (fc.get_state () >= fc_connected)
|
||||
{
|
||||
nconnected++;
|
||||
if (fc.get_state () == fc_input_avail)
|
||||
|
Reference in New Issue
Block a user