From: Jeff King Date: Mon, 25 Apr 2011 16:50:07 GMT Subject: Re: [PATCH 2/2] send-pack: avoid deadlock when pack-object dies early Message-ID: <20110425165007.GB1589@sigill.intra.peff.net> In-Reply-To: <4DB48CCD.40304@kdbg.org> On Sun, Apr 24, 2011 at 10:49:17PM +0200, Johannes Sixt wrote: > diff --git a/builtin-send-pack.c b/builtin-send-pack.c > index 089058b..b371c79 100644 > --- a/builtin-send-pack.c > +++ b/builtin-send-pack.c > @@ -376,6 +376,9 @@ static void print_helper_status(struct ref *ref) > static int sideband_demux(int in, int out, void *data) > { > int *fd = data; > +#ifndef ASYNC_AS_THREAD > + close(fd[1]); > +#endif In the comments for 1/2, you said this goes directly on 38a81b4e. But in that commit, we use #ifndef WIN32 to decide whether or not to fork for async code. So shouldn't this use the same test (I don't even see ASYNC_AS_THREAD defined anywhere else)? And of course in more modern versions, it should be NO_PTHREADS, as you noted. -Peff