[PATCH v5] Handle atexit list internaly for unthreaded builds

2014-10-18 Thread Etienne Buira
eas Schwab Helped-by: Junio C Hamano Signed-off-by: Etienne Buira --- builtin/clone.c | 5 - git-compat-util.h | 5 + run-command.c | 40 shallow.c | 7 ++- 4 files changed, 47 insertions(+), 10 deletions(-) V5: update comm

Re: [PATCH v4] Handle atexit list internaly for unthreaded builds

2014-10-14 Thread Etienne Buira
On Mon, Oct 13, 2014 at 10:00 PM, Junio C Hamano wrote: > Etienne Buira writes: > >> Wrap atexit()s calls on unthreaded builds to handle callback list >> internally. >> >> This is needed because on unthreaded builds, asyncs inherits parent's >> atexit()

Re: [PATCH 2/2] Remove spurious 'no threads support' warnings

2014-10-14 Thread Etienne Buira
On Mon, Oct 13, 2014 at 9:54 PM, Junio C Hamano wrote: > Etienne Buira writes: > >> Threads count being defaulted to 0 (autodetect), and --disable-pthreads >> build checking that thread count==1, there were spurious warnings about >> threads being ignored, despite not s

[PATCH v4] Handle atexit list internaly for unthreaded builds

2014-10-13 Thread Etienne Buira
files too early. Fixes test 5537 (temporary shallow file vanished before unpack-objects could open it) V4: fix bogus preprocessor directives Thanks-to: Duy Nguyen Thanks-to: Andreas Schwab Signed-off-by: Etienne Buira --- builtin/clone.c | 5 - git-compat-util.h | 5 + run-comm

[PATCH v3] Handle atexit list internaly for unthreaded builds

2014-10-13 Thread Etienne Buira
files too early. Fixes test 5537 (temporary shallow file vanished before unpack-objects could open it) V2: remove an obvious mistake V3: wrap, rename and add define in git-compat-util.h Thanks-to: Duy Nguyen Signed-off-by: Etienne Buira --- builtin/clone.c | 5 - git-compat-util.h

Re: [PATCH v2] Handle atexit list internaly for unthreaded builds

2014-10-13 Thread Etienne Buira
On Mon, Oct 13, 2014 at 2:56 AM, Duy Nguyen wrote: > On Sun, Oct 12, 2014 at 4:09 PM, Etienne Buira > wrote: > > Replace atexit()s calls with cmd_atexit that is atexit() on threaded > > builds, but handles the callbacks list internally for unthreaded builds. > > Maybe

[PATCH v2] Handle atexit list internaly fo unthreaded builds

2014-10-12 Thread Etienne Buira
nd of the parent process). That led to remove temporary and lock files too early. Fixes test 5537 (temporary shallow file vanished before unpack-objects could open it) V2: remove an obvious mistake Signed-off-by: Etienne Buira --- builtin/clone.c | 7 +-- builtin/fetch.c | 2 +- builtin

[PATCH] Handle atexit list internaly fo unthreaded builds

2014-10-11 Thread Etienne Buira
nd of the parent process). That led to remove temporary and lock files too early. Fixes test 5537 (temporary shallow file vanished before unpack-objects could open it) Signed-off-by: Etienne Buira --- builtin/clone.c | 7 +-- builtin/fetch.c | 2 +- builtin/gc.c| 2 +- diff.c

[PATCH 2/2] Remove spurious 'no threads support' warnings

2014-10-11 Thread Etienne Buira
those warnings. Signed-off-by: Etienne Buira --- builtin/pack-objects.c | 2 +- thread-utils.h | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/builtin/pack-objects.c b/builtin/pack-objects.c index b59f5d8..7b51453 100644 --- a/builtin/pack-objects.c +++ b/builtin/pack

[PATCH 1/2] fix compilation with --disable-pthreads

2014-10-11 Thread Etienne Buira
Signed-off-by: Etienne Buira --- builtin/index-pack.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/builtin/index-pack.c b/builtin/index-pack.c index eebf1a8..0f88f4b 100644 --- a/builtin/index-pack.c +++ b/builtin/index-pack.c @@ -185,6 +185,9 @@ static void cleanup_thread(void