nmh-workers
[Top] [All Lists]

Re: [Nmh-workers] Changes to allow nmh 1.3 to work on VFAT (or other non-linking FS)

2008-07-08 05:54:05
Peter Maydell wrote:
The first change is fine, but the second (to lock_file.c) needs thinking
about. If it's OK to just creat() the curlock then we ought to be doing
it in all cases, not creating it as something else and link()ing it.
On the other hand, if just-creat() isn't right then you shouldn't be
doing it just because the link() failed EPERM.

It might be OK if you do an open(O_CREAT|O_EXCL) instead of a creat().
We can't do this as the default because O_EXCL doesn't work over NFS.
But if link() fails EPERM we can assume not-NFS and trust that O_EXCL
works on VFAT. (Probably worth testing that.)

I think the code as you have it does no locking at all, so you're
potentially going to lose mail if several programs try to do something
at once.

-- PMM


_______________________________________________
Nmh-workers mailing list
Nmh-workers(_at_)nongnu(_dot_)org
http://lists.nongnu.org/mailman/listinfo/nmh-workers

<Prev in Thread] Current Thread [Next in Thread>