* fhandler.cc (fhandler_base::read): Signal event, if necessary, and raw_read
hasn't done so.
This commit is contained in:
parent
3627f682fe
commit
373c3857c2
@ -1,3 +1,8 @@
|
|||||||
|
2002-12-14 Christopher Faylor <cgf@redhat.com>
|
||||||
|
|
||||||
|
* fhandler.cc (fhandler_base::read): Signal event, if necessary, and
|
||||||
|
raw_read hasn't done so.
|
||||||
|
|
||||||
2002-12-14 Christopher Faylor <cgf@redhat.com>
|
2002-12-14 Christopher Faylor <cgf@redhat.com>
|
||||||
|
|
||||||
* fhandler.cc (fhandler_base::raw_read): Reset priorities to minimize
|
* fhandler.cc (fhandler_base::raw_read): Reset priorities to minimize
|
||||||
|
@ -510,6 +510,7 @@ fhandler_base::read (void *in_ptr, size_t& len)
|
|||||||
{
|
{
|
||||||
char *ptr = (char *) in_ptr;
|
char *ptr = (char *) in_ptr;
|
||||||
ssize_t copied_chars = 0;
|
ssize_t copied_chars = 0;
|
||||||
|
bool need_signal = !!read_state;
|
||||||
int c;
|
int c;
|
||||||
|
|
||||||
while (len)
|
while (len)
|
||||||
@ -534,6 +535,7 @@ fhandler_base::read (void *in_ptr, size_t& len)
|
|||||||
}
|
}
|
||||||
|
|
||||||
raw_read (ptr + copied_chars, len);
|
raw_read (ptr + copied_chars, len);
|
||||||
|
need_signal = false;
|
||||||
if (!copied_chars)
|
if (!copied_chars)
|
||||||
/* nothing */;
|
/* nothing */;
|
||||||
else if ((ssize_t) len > 0)
|
else if ((ssize_t) len > 0)
|
||||||
@ -601,6 +603,9 @@ fhandler_base::read (void *in_ptr, size_t& len)
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
out:
|
out:
|
||||||
|
if (need_signal)
|
||||||
|
SetEvent (read_state);
|
||||||
|
|
||||||
debug_printf ("returning %d, %s mode", len,
|
debug_printf ("returning %d, %s mode", len,
|
||||||
get_r_binary () ? "binary" : "text");
|
get_r_binary () ? "binary" : "text");
|
||||||
return;
|
return;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user