[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Nmh-workers] mhstore -clobber
From: |
Lyndon Nerenberg |
Subject: |
Re: [Nmh-workers] mhstore -clobber |
Date: |
Sun, 16 Sep 2012 08:42:08 -0700 |
On 2012-09-16, at 6:41 AM, David Levine wrote:
> Good point. There isn't a clean way to pass the fd with
> the existing code. Do you see any problems with this:
>
> if ((fd == open (file, O_CREAT | O_EXCL), mode) >= 0) {
> close (fd);
> break;
> }
>
> and later . . .
>
> fopen (file, "w") . . .
Well, there's the obvious race condition ...