aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar Karel Gardas <karel.gardas@centrum.cz>2014-02-26 12:14:26 +0100
committerGravatar Austin Seipp <austin@well-typed.com>2014-02-28 12:08:13 -0600
commitf4d0e106f237d767156b3c751f1b9f4598f2a6a1 (patch)
tree5b174395c98239592f231be449115444f7844761
parent86d798975357c55fd0e5303c83f09844411c3837 (diff)
fix getFileStatus: interrupted (Interrupted system call) build failure on Solaris
Patch provided by Christian Maeder <Christian.Maeder@dfki.de> Signed-off-by: Karel Gardas <karel.gardas@centrum.cz> Signed-off-by: Austin Seipp <austin@well-typed.com>
-rw-r--r--System/Posix/Files.hsc3
-rw-r--r--System/Posix/Files/ByteString.hsc2
2 files changed, 3 insertions, 2 deletions
diff --git a/System/Posix/Files.hsc b/System/Posix/Files.hsc
index 49c9bc1..a54443a 100644
--- a/System/Posix/Files.hsc
+++ b/System/Posix/Files.hsc
@@ -96,6 +96,7 @@ import Foreign.C
import System.Posix.Types
import System.Posix.Files.Common
+import System.Posix.Error
import System.Posix.Internals
import Data.Time.Clock.POSIX
@@ -165,7 +166,7 @@ getFileStatus path = do
fp <- mallocForeignPtrBytes (#const sizeof(struct stat))
withForeignPtr fp $ \p ->
withFilePath path $ \s ->
- throwErrnoPathIfMinus1_ "getFileStatus" path (c_stat s p)
+ throwErrnoPathIfMinus1Retry_ "getFileStatus" path (c_stat s p)
return (FileStatus fp)
-- | Acts as 'getFileStatus' except when the 'FilePath' refers to a symbolic
diff --git a/System/Posix/Files/ByteString.hsc b/System/Posix/Files/ByteString.hsc
index b25a823..4f8a05f 100644
--- a/System/Posix/Files/ByteString.hsc
+++ b/System/Posix/Files/ByteString.hsc
@@ -172,7 +172,7 @@ getFileStatus path = do
fp <- mallocForeignPtrBytes (#const sizeof(struct stat))
withForeignPtr fp $ \p ->
withFilePath path $ \s ->
- throwErrnoPathIfMinus1_ "getFileStatus" path (c_stat s p)
+ throwErrnoPathIfMinus1Retry_ "getFileStatus" path (c_stat s p)
return (FileStatus fp)
-- | Acts as 'getFileStatus' except when the 'RawFilePath' refers to a symbolic