Re: [PATCH v5 18/35] commit_lock_file(): if close fails, roll back
- From
Jonathan Nieder <jrnieder@gmail.com>
- Date
- Sep 16, 2014, 22:19 UTC
- Message-ID
- <20140916221956.GR29050@google.com>
- In-Reply-To
- <1410896036-12750-19-git-send-email-mhagger@alum.mit.edu>
Michael Haggerty wrote:
> If closing an open lockfile fails, then we cannot be sure of the > contents of the lockfile
Is that true? It seems more like a bug in close_lock_file: if it fails, perhaps it should either set lk->fd back to fd or unlink the lockfile itself.
What do other callers do on close_lock_file failure?
Jonathan