Re: Freeing struct lock_file?

2015-04-06 Thread David Turner
On Sat, 2015-04-04 at 09:16 +0200, Torsten Bögershausen wrote: On 2015-04-04 02.24, David Turner wrote: On Fri, 2015-04-03 at 15:01 -0700, Junio C Hamano wrote: David Turner dtur...@twopensource.com writes: Why is it impossible to free struct lock_files? I understand that they become

Re: Freeing struct lock_file?

2015-04-06 Thread David Turner
On Fri, 2015-04-03 at 15:01 -0700, Junio C Hamano wrote: David Turner dtur...@twopensource.com writes: Why is it impossible to free struct lock_files? I understand that they become part of a linked list, and that there's an atexit handler that goes over that list. But couldn't we just

Re: Freeing struct lock_file?

2015-04-04 Thread Torsten Bögershausen
On 2015-04-04 02.24, David Turner wrote: On Fri, 2015-04-03 at 15:01 -0700, Junio C Hamano wrote: David Turner dtur...@twopensource.com writes: Why is it impossible to free struct lock_files? I understand that they become part of a linked list, and that there's an atexit handler that goes

C99 (Was: Re: Freeing struct lock_file?)

2015-04-04 Thread brian m. carlson
On Fri, Apr 03, 2015 at 08:24:43PM -0400, David Turner wrote: But I can see why git wouldn't want to depend on that behavior. C11 has a way to do this safely, but AIUI, git doesn't want to move to C99 let alone C11. So I guess this will just have to remain the way it is. I would really like

Re: Freeing struct lock_file?

2015-04-03 Thread Junio C Hamano
David Turner dtur...@twopensource.com writes: Why is it impossible to free struct lock_files? I understand that they become part of a linked list, and that there's an atexit handler that goes over that list. But couldn't we just remove them from the linked list and then free them? I

Freeing struct lock_file?

2015-04-03 Thread David Turner
Why is it impossible to free struct lock_files? I understand that they become part of a linked list, and that there's an atexit handler that goes over that list. But couldn't we just remove them from the linked list and then free them? Even if we couldn't free all lock_files, maybe we could

Re: Freeing struct lock_file?

2015-04-03 Thread David Turner
On Fri, 2015-04-03 at 15:01 -0700, Junio C Hamano wrote: David Turner dtur...@twopensource.com writes: Why is it impossible to free struct lock_files? I understand that they become part of a linked list, and that there's an atexit handler that goes over that list. But couldn't we just