aboutsummaryrefslogtreecommitdiffhomepage
path: root/System/Posix/Error.hs
diff options
context:
space:
mode:
authorGravatar Simon Marlow <marlowsd@gmail.com>2011-05-10 11:16:55 +0100
committerGravatar Simon Marlow <marlowsd@gmail.com>2011-05-10 11:16:55 +0100
commitb7b180d23472dca03fb4c809cd86bcd6d3f01ea9 (patch)
tree6e20b00c909d197fb2f762334b260ef15c36475e /System/Posix/Error.hs
parentcdf2106d5d09bc54702c3d2f1fa5cbeeb772d70c (diff)
allow some syscalls in System.Posix.Directory to return EINTR (#5184)
Diffstat (limited to 'System/Posix/Error.hs')
-rw-r--r--System/Posix/Error.hs7
1 files changed, 6 insertions, 1 deletions
diff --git a/System/Posix/Error.hs b/System/Posix/Error.hs
index cd4b91e..d0683c5 100644
--- a/System/Posix/Error.hs
+++ b/System/Posix/Error.hs
@@ -21,7 +21,8 @@ module System.Posix.Error (
throwErrnoPathIfNullRetry,
throwErrnoPathIfMinus1,
throwErrnoPathIfMinus1_,
- throwErrnoPathIfMinus1Retry
+ throwErrnoPathIfMinus1Retry,
+ throwErrnoPathIfMinus1Retry_
) where
import Foreign
@@ -31,6 +32,10 @@ throwErrnoPathIfMinus1Retry :: Num a => String -> FilePath -> IO a -> IO a
throwErrnoPathIfMinus1Retry loc path f =
throwErrnoPathIfRetry (== -1) loc path f
+throwErrnoPathIfMinus1Retry_ :: Num a => String -> FilePath -> IO a -> IO ()
+throwErrnoPathIfMinus1Retry_ loc path f =
+ void $ throwErrnoPathIfRetry (== -1) loc path f
+
throwErrnoPathIfNullRetry :: String -> FilePath -> IO (Ptr a) -> IO (Ptr a)
throwErrnoPathIfNullRetry loc path f =
throwErrnoPathIfRetry (== nullPtr) loc path f