* select.cc (fhandler_pipe::ready_for_read): Assure that get_guard is called

for successful non-blocking pipe reads.
This commit is contained in:
Christopher Faylor
2003-04-23 01:27:51 +00:00
parent afef487c7d
commit 0eaf24fead
2 changed files with 13 additions and 4 deletions

View File

@@ -586,11 +586,15 @@ pipe_cleanup (select_record *, select_stuff *stuff)
int
fhandler_pipe::ready_for_read (int fd, DWORD howlong)
{
if (!howlong)
return fhandler_base::ready_for_read (fd, howlong);
int res;
if (howlong)
res = true;
else
res = fhandler_base::ready_for_read (fd, howlong);
get_guard ();
return true;
if (res)
get_guard ();
return res;
}
select_record *