[commit: ghc] ghc-8.2: PackageDb: Explicitly unlock package database before closing (f093d7e)
git at git.haskell.org
git at git.haskell.org
Mon Oct 16 20:39:47 UTC 2017
Repository : ssh://git@git.haskell.org/ghc
On branch : ghc-8.2
Link : http://ghc.haskell.org/trac/ghc/changeset/f093d7ea26323f026d95338162913c33525b32fe/ghc
>---------------------------------------------------------------
commit f093d7ea26323f026d95338162913c33525b32fe
Author: Ben Gamari <bgamari.foss at gmail.com>
Date: Tue Aug 29 14:45:28 2017 -0400
PackageDb: Explicitly unlock package database before closing
Reviewers: austin
Subscribers: rwbarton, thomie
GHC Trac Issues: #13945
Differential Revision: https://phabricator.haskell.org/D3874
(cherry picked from commit 779b9e6965416ee08af6eb15354cf09e9f40e0d9)
>---------------------------------------------------------------
f093d7ea26323f026d95338162913c33525b32fe
libraries/ghc-boot/GHC/PackageDb.hs | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/libraries/ghc-boot/GHC/PackageDb.hs b/libraries/ghc-boot/GHC/PackageDb.hs
index 9ce07e7..a59c46e 100644
--- a/libraries/ghc-boot/GHC/PackageDb.hs
+++ b/libraries/ghc-boot/GHC/PackageDb.hs
@@ -267,7 +267,11 @@ lockPackageDbWith mode file = do
return $ PackageDbLock hnd
lockPackageDb = lockPackageDbWith ExclusiveLock
-unlockPackageDb (PackageDbLock hnd) = hClose hnd
+unlockPackageDb (PackageDbLock hnd) = do
+#if MIN_VERSION_base(4,11,0)
+ hUnlock hnd
+#endif
+ hClose hnd
-- MIN_VERSION_base(4,10,0)
#else
More information about the ghc-commits
mailing list