diff options
author | Christopher Faylor <me@cgf.cx> | 2011-05-30 17:16:24 +0000 |
---|---|---|
committer | Christopher Faylor <me@cgf.cx> | 2011-05-30 17:16:24 +0000 |
commit | de3c57f06e3b8244c44e7203dc50cfad8a68f130 (patch) | |
tree | 12e5b0f64b965f0fe4d372fb034e5e9bdda9015c /winsup/cygwin/fhandler.cc | |
parent | 6642f7daa369ede921ce92eb819f01dc58b18b30 (diff) | |
download | cygnal-de3c57f06e3b8244c44e7203dc50cfad8a68f130.tar.gz cygnal-de3c57f06e3b8244c44e7203dc50cfad8a68f130.tar.bz2 cygnal-de3c57f06e3b8244c44e7203dc50cfad8a68f130.zip |
* dll_init.cc (dll_list::append): Eliminate increment of unused tot variable.
* dll_init.h (dll_list::tot): Delete.
(dll_list::populate_all_deps): Delete undefined function.
* fhandler.cc (fhandler_base_overlapped::wait_overlapped): Move EPIPE handling
under error condition.
Diffstat (limited to 'winsup/cygwin/fhandler.cc')
-rw-r--r-- | winsup/cygwin/fhandler.cc | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/winsup/cygwin/fhandler.cc b/winsup/cygwin/fhandler.cc index deb1ade16..b64b09047 100644 --- a/winsup/cygwin/fhandler.cc +++ b/winsup/cygwin/fhandler.cc @@ -1887,13 +1887,15 @@ fhandler_base_overlapped::wait_overlapped (bool inres, bool writing, DWORD *byte HANDLE h = writing ? get_output_handle () : get_handle (); CancelIo (h); ResetEvent (get_overlapped ()); - if (res == overlapped_error) - __seterrno_from_win_error (err); *bytes = (DWORD) -1; + if (res == overlapped_error) + { + __seterrno_from_win_error (err); + if (writing && (err == ERROR_NO_DATA || err == ERROR_BROKEN_PIPE)) + raise (SIGPIPE); + } } - if (writing && (err == ERROR_NO_DATA || err == ERROR_BROKEN_PIPE)) - raise (SIGPIPE); return res; } |