]> sourceware.org Git - newlib-cygwin.git/commitdiff
* fhandler.cc (fhandler_base::read): Signal event, if necessary, and raw_read
authorChristopher Faylor <me@cgf.cx>
Sat, 14 Dec 2002 19:11:42 +0000 (19:11 +0000)
committerChristopher Faylor <me@cgf.cx>
Sat, 14 Dec 2002 19:11:42 +0000 (19:11 +0000)
hasn't done so.

winsup/cygwin/ChangeLog
winsup/cygwin/fhandler.cc

index a73b99016a388c46689a19330b5b1766191816ce..d932e9c3ae1e8d1a6d347987efcd86a82a530804 100644 (file)
@@ -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>
 
        * fhandler.cc (fhandler_base::raw_read): Reset priorities to minimize
index a96f99c69bf27226f47146f898e72b95bc014560..f73b8baf4cdb046764e477e2fbd7337f7f26693d 100644 (file)
@@ -510,6 +510,7 @@ fhandler_base::read (void *in_ptr, size_t& len)
 {
   char *ptr = (char *) in_ptr;
   ssize_t copied_chars = 0;
+  bool need_signal = !!read_state;
   int c;
 
   while (len)
@@ -534,6 +535,7 @@ fhandler_base::read (void *in_ptr, size_t& len)
     }
 
   raw_read (ptr + copied_chars, len);
+  need_signal = false;
   if (!copied_chars)
     /* nothing */;
   else if ((ssize_t) len > 0)
@@ -601,6 +603,9 @@ fhandler_base::read (void *in_ptr, size_t& len)
 #endif
 
 out:
+  if (need_signal)
+    SetEvent (read_state);
+
   debug_printf ("returning %d, %s mode", len,
                get_r_binary () ? "binary" : "text");
   return;
This page took 0.038381 seconds and 5 git commands to generate.