[commit: packages/unix] ghc-7.8: fix getFileStatus: interrupted (Interrupted system call) build failure on Solaris (5961343)

git at git.haskell.org git at git.haskell.org
Fri Feb 28 23:39:52 UTC 2014


Repository : ssh://git@git.haskell.org/unix

On branch  : ghc-7.8
Link       : http://ghc.haskell.org/trac/ghc/changeset/5961343ec971876b96a3238f22b4a2209697b5ff/unix

>---------------------------------------------------------------

commit 5961343ec971876b96a3238f22b4a2209697b5ff
Author: Karel Gardas <karel.gardas at centrum.cz>
Date:   Wed Feb 26 12:14:26 2014 +0100

    fix getFileStatus: interrupted (Interrupted system call) build failure on Solaris
    
    Patch provided by Christian Maeder <Christian.Maeder at dfki.de>
    
    Signed-off-by: Karel Gardas <karel.gardas at centrum.cz>
    Signed-off-by: Austin Seipp <austin at well-typed.com>
    
    (cherry picked from commit f4d0e106f237d767156b3c751f1b9f4598f2a6a1)


>---------------------------------------------------------------

5961343ec971876b96a3238f22b4a2209697b5ff
 System/Posix/Files.hsc            |    3 ++-
 System/Posix/Files/ByteString.hsc |    2 +-
 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



More information about the ghc-commits mailing list