Re: [PATCH 2/2] close_lock_file(): new function in the lockfile API
- From
Brandon Casey <casey@nrlssc.navy.mil>
- Date
- Jan 16, 2008, 23:28 UTC
- Message-ID
- <Pine.LNX.4.64.0801161725010.31161@torch.nrlssc.navy.mil>
- In-Reply-To
- <7vtzldmk8p.fsf@gitster.siamese.dyndns.org>
On Wed, 16 Jan 2008, Junio C Hamano wrote:
Show 9 quoted lines
> Brandon Casey <casey@nrlssc.navy.mil> writes: > >> My patch does this, though I understand it may take some time to review. >> >> I left the lk->fd unmodified when close() failed in case the caller >> would like to include it in an error message. > > But that would bring us back to the same double-close issue, > wouldn't it?
Yes it would. Although I knew it would happen, I was disregarding _that_ double close case for some reason.
You're right, your's and Linus's version is better.
-brandon