Cabal: outstanding copyFile bug?

John Meacham john at
Tue Aug 22 12:52:52 EDT 2006

On Tue, Aug 22, 2006 at 01:20:02PM +0100, Simon Marlow wrote:
> I've fixed this in System.Directory.copyFile, although there doesn't seem 
> to be a foolproof way to do it: if you unlink before opening, there's a 
> chance that someone else can create the file in between.  Still, this 
> appears to be what install(3) does.

Isn't it standard practice to create a file as a new name in the same
directory, then rename(2) it to be the same as the target?, that doesn't
introduce any race conditions as rename(2) is atomic.


John Meacham - ⑆⑆john⑈

More information about the Libraries mailing list