Re: [PATCH v5 19/35] commit_lock_file(): rollback lock file on failure to rename

2014-09-23 Thread Michael Haggerty
On 09/17/2014 12:22 AM, Jonathan Nieder wrote: > Michael Haggerty wrote: > >> If rename() fails, call rollback_lock_file() to delete the lock file >> (in case it is still present) and reset the filename field to the >> empty string so that the lockfile object is left in a valid state. > > Can you

Re: [PATCH v5 19/35] commit_lock_file(): rollback lock file on failure to rename

2014-09-16 Thread Jonathan Nieder
Michael Haggerty wrote: > If rename() fails, call rollback_lock_file() to delete the lock file > (in case it is still present) and reset the filename field to the > empty string so that the lockfile object is left in a valid state. Can you spell out more what the goal is? Is the idea to keep the

[PATCH v5 19/35] commit_lock_file(): rollback lock file on failure to rename

2014-09-16 Thread Michael Haggerty
If rename() fails, call rollback_lock_file() to delete the lock file (in case it is still present) and reset the filename field to the empty string so that the lockfile object is left in a valid state. Signed-off-by: Michael Haggerty --- lockfile.c | 18 +++--- 1 file changed, 11 ins