#1963: Pressing ^C at the right moment can trash GHC's package list
----------------------+-----------------------------------------------------
Reporter: igloo | Owner: igloo
Type: merge | Status: closed
Priority: normal | Milestone: 6.8.3
Component: Compiler | Version: 6.8.1
Severity: normal | Resolution: fixed
Keywords: | Difficulty: Unknown
Testcase: | Architecture: Unknown
Os: Unknown |
----------------------+-----------------------------------------------------
Comment (by duncan):
Instead of the dodgy backing up of the old file, it should use the
`writeFileAtomic` from Cabal. On Unix it is genuinely atomic (assuming ^C
is turned into an exception) and on Windows there is a very narrow race
condition but it's probably a good deal narrower than in `ghc-pkg`'s
current impl.
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/1963#comment:4>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
_______________________________________________
Glasgow-haskell-bugs mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs