Re: [PATCH 05/22] lockfile: unlock file if lockfile permissions cannot be adjusted

2014-04-06 Thread Michael Haggerty
On 04/02/2014 08:47 AM, Torsten Bögershausen wrote: [] diff --git a/lockfile.c b/lockfile.c index c1af65b..1928e5e 100644 --- a/lockfile.c +++ b/lockfile.c @@ -148,9 +148,11 @@ static int lock_file(struct lock_file *lk, const char *path, int flags) lock_file_list = lk;

Re: [PATCH 05/22] lockfile: unlock file if lockfile permissions cannot be adjusted

2014-04-02 Thread Torsten Bögershausen
[] diff --git a/lockfile.c b/lockfile.c index c1af65b..1928e5e 100644 --- a/lockfile.c +++ b/lockfile.c @@ -148,9 +148,11 @@ static int lock_file(struct lock_file *lk, const char *path, int flags) lock_file_list = lk; lk-on_list = 1;

Re: [PATCH 05/22] lockfile: unlock file if lockfile permissions cannot be adjusted

2014-04-01 Thread Jeff King
On Tue, Apr 01, 2014 at 05:58:13PM +0200, Michael Haggerty wrote: If the call to adjust_shared_perm() fails, lock_file returns -1, which to the caller looks like any other failure to lock the file. So in this case, roll back the lockfile before returning so that the lock file is deleted

Re: [PATCH 05/22] lockfile: unlock file if lockfile permissions cannot be adjusted

2014-04-01 Thread Jeff King
On Tue, Apr 01, 2014 at 04:02:42PM -0400, Jeff King wrote: On Tue, Apr 01, 2014 at 05:58:13PM +0200, Michael Haggerty wrote: If the call to adjust_shared_perm() fails, lock_file returns -1, which to the caller looks like any other failure to lock the file. So in this case, roll back the