nmh-workers
[Top] [All Lists]

Re: [Nmh-workers] mhstore -clobber

2012-09-16 11:50:46
Lyndon wrote:

On 2012-09-16, at 8:42 AM, Lyndon Nerenberg wrote:

Well, there's the obvious race condition ...

Sorry, I left out the "NFS" in front of "race."

What's the NFS race condition?  If you're talking about
old NFS that doesn't support O_EXCL, I'm not willing to
jump through hoops for that.

Also, there's a small window of opportunity to leave file turds
behind if the code interrupts (or, say, the file table fills up)
during the "and later ..." portion.

In this case, I don't see that as a big problem.  The user
is trying to store contents in a file.  If something goes
wrong, they might end up with an empty file.  There are other
ways for that to happen, as well.  In any case, they'll know
(if they look at the process exit status) that something went
wrong.

It can't be that hard to just fix it the right way.

It's not that it's hard, it's that it would add yet another
mess to the code.  In this case, I don't think it's worth it.

David


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

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