diff options
Diffstat (limited to 'winsup/cygwin/fcntl.cc')
-rw-r--r-- | winsup/cygwin/fcntl.cc | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/winsup/cygwin/fcntl.cc b/winsup/cygwin/fcntl.cc index b1f0d9972..f9a023ec4 100644 --- a/winsup/cygwin/fcntl.cc +++ b/winsup/cygwin/fcntl.cc @@ -18,12 +18,17 @@ details. */ #include "dtable.h" #include "cygheap.h" #include "thread.h" +#include "cygtls.h" int fcntl_worker (int fd, int cmd, void *arg) { int res; + myfault efault; + if (efault.faulted (EFAULT)) + return -1; + cygheap_fdget cfd (fd, true); if (cfd < 0) { |