[darcs-users] strange bug with Windows share mounted on Mac OS X

David Roundy droundy at abridgegame.org
Wed Oct 20 11:50:15 UTC 2004


On Tue, Oct 19, 2004 at 08:45:51PM +0200, Juliusz Chroboczek wrote:
> > You're right, it's probably better to be safe that sorry and to do the
> > mmap check before every attempted mmap (or do the mmap check once per
> > darcs run and check the result before every attempted mmap op).
> 
> Mmap ain't cheap, especially on some older systems.  Please don't make
> darcs slower just to satisfy some rather exotic needs.

I don't actually check on whether mmap is safe.  I just open a temporary
file and try to delete it before closing it.  If it fails, we're on a
system where mmap could be dangerous, since we never explicitly munmap
(leave that to the GC), so we don't mmap.  And I only run the check before
doing an mmap_slurp, which itself is a slow operation, so I don't think the
cost will be noticable.

> (Not exotic?  Running Unix Darcs on a system where /usr/bin is case-
> insensitive by communicating with a Windows machine using an old IBM
> protocol?)

Yes, it's definitely a bit obscure, but on the other hand, it also seems to
be somewhat common.  (Did I just contradict myself?) In any case, debugging
this sort of problem is likely to also benefit pure windows users, and you
can't argue that *they're* rare...
-- 
David Roundy
http://www.abridgegame.org




More information about the darcs-users mailing list