* 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

@ -1,3 +1,8 @@
2003-04-22 Christopher Faylor <cgf@redhat.com>
* select.cc (fhandler_pipe::ready_for_read): Assure that get_guard is
called for successful non-blocking pipe reads.
2003-04-22 Corinna Vinschen <corinna@vinschen.de> 2003-04-22 Corinna Vinschen <corinna@vinschen.de>
* include/inttypes.h: New file. * include/inttypes.h: New file.

View File

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