From: Johannes Sixt Date: Mon, 16 May 2011 20:02:16 GMT Subject: Re: [PATCH 3/3] send-pack: avoid deadlock on git:// push with failed pack-objects Message-ID: <4DD182C8.50308@kdbg.org> In-Reply-To: <20110516065257.GC19078@sigill.intra.peff.net> Am 16.05.2011 08:52, schrieb Jeff King: > And if you wanted to drop the first two patches, this probably works OK > without the conditional, as the shutdown is just a no-op on a pipe > descriptor then. > > builtin-send-pack.c | 2 ++ > 1 files changed, 2 insertions(+), 0 deletions(-) > > diff --git a/builtin-send-pack.c b/builtin-send-pack.c > index 3e70795..682a3f9 100644 > --- a/builtin-send-pack.c > +++ b/builtin-send-pack.c > @@ -520,6 +520,8 @@ int send_pack(struct send_pack_args *args, > ref->status = REF_STATUS_NONE; > if (args->stateless_rpc) > close(out); > + if (git_connection_is_socket(conn)) > + shutdown(fd[0], SHUT_WR); > if (use_sideband) > finish_async(&demux); > return -1; We probably need a wrapper for shutdown() on Windows. I'll look into this tomorrow. -- Hannes