
22 Aug
2006
22 Aug
'06
12:52 p.m.
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 -- John Meacham - ⑆repetae.net⑆john⑈