Re: [PATCH 1/3] fdopen_lock_file(): access a lockfile using stdio

2014-10-11 Thread Michael Haggerty
Sorry, I see I never responded to this email. On 10/02/2014 11:29 AM, Torsten Bögershausen wrote: > On 01.10.14 13:14, Michael Haggerty wrote: > [] > Nice done, small comments inline >> diff --git a/lockfile.c b/lockfile.c >> index d27e61c..e046027 100644 >> --- a/lockfile.c >> +++ b/lockfile.c >>

Re: [PATCH 1/3] fdopen_lock_file(): access a lockfile using stdio

2014-10-02 Thread Torsten Bögershausen
On 01.10.14 13:14, Michael Haggerty wrote: [] Nice done, small comments inline > diff --git a/lockfile.c b/lockfile.c > index d27e61c..e046027 100644 > --- a/lockfile.c > +++ b/lockfile.c > @@ -7,20 +7,29 @@ > > static struct lock_file *volatile lock_file_list; > > -static void remove_lock_fi

Re: [PATCH 1/3] fdopen_lock_file(): access a lockfile using stdio

2014-10-01 Thread Junio C Hamano
Jeff King writes: > On Wed, Oct 01, 2014 at 01:14:47PM +0200, Michael Haggerty wrote: > >> ... If using stdio on lockfiles becomes >> more popular, we might want to add some helper functions to make it a >> bit more convenient. > > I think it makes sense to wait until we see more potential caller

Re: [PATCH 1/3] fdopen_lock_file(): access a lockfile using stdio

2014-10-01 Thread Jeff King
On Wed, Oct 01, 2014 at 01:14:47PM +0200, Michael Haggerty wrote: > I thought about adding second stdio-oriented entrance points analogous > to hold_lock_file_for_update(), hold_lock_file_for_append(), and > reopen_lock_file(), but it seemed simpler to add just the one new > function instead of th

[PATCH 1/3] fdopen_lock_file(): access a lockfile using stdio

2014-10-01 Thread Michael Haggerty
Add a new function, fdopen_lock_file(), which returns a FILE pointer open to the lockfile. If a stream is open on a lock_file object, it is closed using fclose() on commit, rollback, or close_lock_file(). This change will allow callers to use stdio to write to a lockfile without having to muck aro