summaryrefslogtreecommitdiff
path: root/libraries/base/cbits/inputReady.c
diff options
context:
space:
mode:
authorSimon Marlow <simonmar@microsoft.com>2007-08-30 13:11:15 +0000
committerSimon Marlow <simonmar@microsoft.com>2007-08-30 13:11:15 +0000
commit11e8e5c81077258587c77adb4b5bb1046f49514d (patch)
tree8489a031308c88e9252f8bcffcbbea9164f08a2e /libraries/base/cbits/inputReady.c
parente5954dc9caaa13cc32ee36b9ebd9b2014ee53d8d (diff)
downloadhaskell-11e8e5c81077258587c77adb4b5bb1046f49514d.tar.gz
make hWaitForInput/hReady not fail with "invalid argument" on Windows
See #1198. This doesn't fully fix it, because hReady still always returns False on file handles. I'm not really sure how to fix that.
Diffstat (limited to 'libraries/base/cbits/inputReady.c')
-rw-r--r--libraries/base/cbits/inputReady.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/libraries/base/cbits/inputReady.c b/libraries/base/cbits/inputReady.c
index f539110f19..947cc4f1bc 100644
--- a/libraries/base/cbits/inputReady.c
+++ b/libraries/base/cbits/inputReady.c
@@ -75,7 +75,8 @@ fdReady(int fd, int write, int msecs, int isSock)
if (rc == ERROR_BROKEN_PIPE) {
return 1; // this is probably what we want
}
- if (rc != ERROR_INVALID_HANDLE) {
+ if (rc != ERROR_INVALID_HANDLE && rc != ERROR_INVALID_FUNCTION) {
+ maperrno();
return -1;
}
}