[darcs-users] darcs patch: resolve issue1273: Work around a race in download code.

Eric Kow kowey at darcs.net
Fri Dec 26 10:36:14 UTC 2008


Hi,

On Thu, Dec 25, 2008 at 22:29:20 +0100, Petr Rockai wrote:
> this patch sort of fixes Zooko's race. I have actually reproduced the problem
> (using just his recipe, darcs fell apart really quickly). Using the proposed
> patch fixes the problem for me. I would use getProcessID but that doesn't exist
> on win32. This seems to be reasonably safe...

This makes sense to me, so applied, thanks!

This patch appends the same random string to all temporary filenames
created by the same urlThread.  Before the filenames were based on the
name of the file being downloaded, e.g. foo-new which seems to lead to
the problems that Zooko found.  With the new patch, we get a distinct
filename for each urlThread and thereby instance of darcs.

-- 
Eric Kow <http://www.nltg.brighton.ac.uk/home/Eric.Kow>
PGP Key ID: 08AC04F9
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 194 bytes
Desc: not available
Url : http://lists.osuosl.org/pipermail/darcs-users/attachments/20081226/2dec8219/attachment.pgp 


More information about the darcs-users mailing list