* fhandler.cc (fhandler_base::read): Return just read ahead characters if slow

device.
* fhandler.h (fhandler_base::set_eof): New virtual method.
(fhandler_pipe::set_eof): New method.
* pipe.cc (fhandler_pipe::fhandler_pipe): Clear saweof flag.
(fhandler_pipe::read): Return immediately if hit eof.
(fhandler_pipe::hit_eof): Return true if saweof flag is set.
* select.cc (peek_pipe): Don't call PeekNamedPipe if we couldn't grab the guard
mutex.
This commit is contained in:
Christopher Faylor
2001-11-03 05:42:21 +00:00
parent 243a041bd0
commit c41570695a
5 changed files with 36 additions and 46 deletions

View File

@ -479,6 +479,9 @@ fhandler_base::read (void *in_ptr, size_t in_len)
len--;
}
if (copied_chars && is_slow ())
return copied_chars;
if (len)
{
int readlen = raw_read (ptr + copied_chars, len);