Cygwin: fhandler_fifo::hit_eof: improve reliability

Use the writer count introduced in the previous commit to help detect
EOF.  Drop the maybe_eof method, which is no longer needed.
This commit is contained in:
Ken Brown
2020-07-11 14:23:11 -04:00
parent 8ca713d70a
commit e10425e1e3
3 changed files with 6 additions and 30 deletions

View File

@@ -883,9 +883,8 @@ peek_fifo (select_record *s, bool from_select)
goto out;
}
}
fh->maybe_eof (!nconnected);
fh->fifo_client_unlock ();
if (fh->maybe_eof () && fh->hit_eof ())
if (!nconnected && fh->hit_eof ())
{
select_printf ("read: %s, saw EOF", fh->get_name ());
gotone += s->read_ready = true;