Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristopher Faylor <me@cgf.cx>2009-06-28 23:23:13 +0400
committerChristopher Faylor <me@cgf.cx>2009-06-28 23:23:13 +0400
commitc81ceaefec39454f5f76f91be2885d577a668527 (patch)
treecb9c49bf0597eb5d22275fdd8a7f955b7b7f6eee /winsup/cygwin/select.cc
parent91000b5d66688fe62926edc72a00f00c9cda30ab (diff)
* fhandler.h (fhandler_base::has_ongoing_io): Declare new function.
* fhandler.cc (fhandler_base::has_ongoing_io): Define new function. (fhandler_base::read_overlapped): Use has_ongoing_io to avoid writing when handle has not completed last I/O. (fhandler_base::write_overlapped): Ditto. * select.cc (peek_pipe): Be more careful about accessing hEvent field from get_overlapped().
Diffstat (limited to 'winsup/cygwin/select.cc')
-rw-r--r--winsup/cygwin/select.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/winsup/cygwin/select.cc b/winsup/cygwin/select.cc
index c3dc0055b..26cb3b40e 100644
--- a/winsup/cygwin/select.cc
+++ b/winsup/cygwin/select.cc
@@ -513,7 +513,7 @@ out:
else if (fh->get_device () == FH_PIPER)
select_printf ("%s, select for write on read end of pipe",
fh->get_name ());
- else if (fh->get_overlapped ()->hEvent
+ else if (fh->get_overlapped () && fh->get_overlapped ()->hEvent
&& WaitForSingleObject (fh->get_overlapped ()->hEvent, 0)
!= WAIT_OBJECT_0)
s->write_ready = false;