[commit: ghc] master: PackageDb: Explicitly unlock package database before closing (779b9e6)
git at git.haskell.org
git at git.haskell.org
Tue Aug 29 23:10:52 UTC 2017
Repository : ssh://git@git.haskell.org/ghc
On branch : master
Link : http://ghc.haskell.org/trac/ghc/changeset/779b9e6965416ee08af6eb15354cf09e9f40e0d9/ghc
>---------------------------------------------------------------
commit 779b9e6965416ee08af6eb15354cf09e9f40e0d9
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
>---------------------------------------------------------------
779b9e6965416ee08af6eb15354cf09e9f40e0d9
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