diff options
author | Christopher Faylor <me@cgf.cx> | 2003-04-23 01:27:51 +0000 |
---|---|---|
committer | Christopher Faylor <me@cgf.cx> | 2003-04-23 01:27:51 +0000 |
commit | 0eaf24fead7c2a82847f195e9077b5010ace82da (patch) | |
tree | d2c8d3680bec2ce4428bae4b3937acdd25aa2d6f /winsup | |
parent | afef487c7d41371152f6e4b1460301fdd1e5a2e8 (diff) | |
download | newlib-0eaf24fead7c2a82847f195e9077b5010ace82da.zip newlib-0eaf24fead7c2a82847f195e9077b5010ace82da.tar.gz newlib-0eaf24fead7c2a82847f195e9077b5010ace82da.tar.bz2 |
* select.cc (fhandler_pipe::ready_for_read): Assure that get_guard is called
for successful non-blocking pipe reads.
Diffstat (limited to 'winsup')
-rw-r--r-- | winsup/cygwin/ChangeLog | 5 | ||||
-rw-r--r-- | winsup/cygwin/select.cc | 12 |
2 files changed, 13 insertions, 4 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog index 45602de..c342f05 100644 --- a/winsup/cygwin/ChangeLog +++ b/winsup/cygwin/ChangeLog @@ -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> * include/inttypes.h: New file. diff --git a/winsup/cygwin/select.cc b/winsup/cygwin/select.cc index 1a90696..100d6f2 100644 --- a/winsup/cygwin/select.cc +++ b/winsup/cygwin/select.cc @@ -586,11 +586,15 @@ pipe_cleanup (select_record *, select_stuff *stuff) int fhandler_pipe::ready_for_read (int fd, DWORD howlong) { - if (!howlong) - return fhandler_base::ready_for_read (fd, howlong); + int res; + if (howlong) + res = true; + else + res = fhandler_base::ready_for_read (fd, howlong); - get_guard (); - return true; + if (res) + get_guard (); + return res; } select_record * |