Am 25.04.2011 18:50, schrieb Jeff King:
On Sun, Apr 24, 2011 at 10:49:17PM +0200, Johannes Sixt wrote:
quoted
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)?
Oops, you are right. I was looking at f6b60983, the one that the
two-patch series should be merged to; there, we remove ASYNC_AS_THREAD
and replace it by NO_PTHREADS. Therefore, I assumed that we use the
former symbol to decide whether to use threaded async procedures.
Obviously, the symbol was introduced only later. Will resend.
-- Hannes