Re: [PATCH 2/2] send-pack: avoid deadlock when pack-object dies early
- From
Jeff King <peff@peff.net>
- Date
- Apr 25, 2011, 16:50 UTC
- 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:
Show 11 quoted lines
> 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]);
> +#endifIn 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