I think I meant to write "big pidfiles" there.
With xsize_t() gc would die when seeing a pidfile whose size doesn't fit into
size_t. The version I sent just ignores such files. However, it would choke
on slightly smaller files that happen to not fit into memory. And no
reasonable pidfile can
Am 20.04.2017 um 20:37 schrieb Torsten Bögershausen:
On 2017-04-19 22:02, René Scharfe wrote:
Am 19.04.2017 um 21:09 schrieb Torsten Bögershausen:
On 2017-04-19 19:28, René Scharfe wrote:
[]
One or two minor comments inline
diff --git a/builtin/gc.c b/builtin/gc.c
index 2daede7820..4c1c01e87d
On 2017-04-19 22:02, René Scharfe wrote:
> Am 19.04.2017 um 21:09 schrieb Torsten Bögershausen:
>> On 2017-04-19 19:28, René Scharfe wrote:
>> []
>> One or two minor comments inline
>>> diff --git a/builtin/gc.c b/builtin/gc.c
>>> index 2daede7820..4c1c01e87d 100644
>>> --- a/builtin/gc.c
>>> +++ b
Am 19.04.2017 um 21:09 schrieb Torsten Bögershausen:
On 2017-04-19 19:28, René Scharfe wrote:
[]
One or two minor comments inline
diff --git a/builtin/gc.c b/builtin/gc.c
index 2daede7820..4c1c01e87d 100644
--- a/builtin/gc.c
+++ b/builtin/gc.c
@@ -228,21 +228,99 @@ static int need_to_gc(void)
On 2017-04-19 19:28, René Scharfe wrote:
[]
One or two minor comments inline
> diff --git a/builtin/gc.c b/builtin/gc.c
> index 2daede7820..4c1c01e87d 100644
> --- a/builtin/gc.c
> +++ b/builtin/gc.c
> @@ -228,21 +228,99 @@ static int need_to_gc(void)
> return 1;
> }
>
> +struct pidfile {
> I had another look at this last night and cooked up the following patch.
> Might
> have gone overboard with it..
>
> -- >8 --
> Subject: [PATCH] gc: support arbitrary hostnames and pids in
> lock_repo_for_gc()
>
> git gc writes its pid and hostname into a pidfile to prevent concurrent
> gar
Am 19.04.2017 um 03:28 schrieb Jonathan Nieder:
> David Turner wrote:
>> @@ -274,7 +278,7 @@ static const char *lock_repo_for_gc(int force, pid_t*
>> ret_pid)
>> * running.
>> */
>> time(NULL) - st.st_mtime <= 12 * 3600 &&
>> -
Am 19.04.2017 um 03:28 schrieb Jonathan Nieder:
>> From: René Scharfe
>>
>> POSIX limits the length of host names to HOST_NAME_MAX. Export the
>> fallback definition from daemon.c and use this constant to make all
>> buffers used with gethostname(2) big enough for any possible result
>> and a ter
Jonathan Nieder writes:
>> @@ -274,7 +278,7 @@ static const char *lock_repo_for_gc(int force, pid_t*
>> ret_pid)
>> * running.
>> */
>> time(NULL) - st.st_mtime <= 12 * 3600 &&
>> -fscanf(fp, "%"SCNuMAX" %127c",
Hi,
David Turner wrote:
> From: René Scharfe
>
> POSIX limits the length of host names to HOST_NAME_MAX. Export the
> fallback definition from daemon.c and use this constant to make all
> buffers used with gethostname(2) big enough for any possible result
> and a terminating NUL.
Since some pl
From: René Scharfe
POSIX limits the length of host names to HOST_NAME_MAX. Export the
fallback definition from daemon.c and use this constant to make all
buffers used with gethostname(2) big enough for any possible result
and a terminating NUL.
Inspired-by: David Turner
Signed-off-by: Rene Sch
11 matches
Mail list logo