diff options
author | Simon Marlow <simonmar@microsoft.com> | 2007-08-30 13:11:15 +0000 |
---|---|---|
committer | Simon Marlow <simonmar@microsoft.com> | 2007-08-30 13:11:15 +0000 |
commit | 11e8e5c81077258587c77adb4b5bb1046f49514d (patch) | |
tree | 8489a031308c88e9252f8bcffcbbea9164f08a2e | |
parent | e5954dc9caaa13cc32ee36b9ebd9b2014ee53d8d (diff) | |
download | haskell-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.
-rw-r--r-- | libraries/base/cbits/inputReady.c | 3 |
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; } } |