Skip to content

Commit

Permalink
Merge branch 'js/maint-1.6.6-send-pack-stateless-rpc-deadlock-fix' in…
Browse files Browse the repository at this point in the history
…to js/maint-send-pack-stateless-rpc-deadlock-fix

* js/maint-1.6.6-send-pack-stateless-rpc-deadlock-fix:
  send-pack: avoid deadlock when pack-object dies early

Evil merge to adjust the way the use of pthreads in sideband-demultiplexor
was decided (earlier it was "if we are not on Windows", now it is "if we
are not using pthreads").
  • Loading branch information
Junio C Hamano committed Apr 25, 2011
2 parents f6b6098 + 09c9957 commit 73776dc
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions builtin-send-pack.c
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ static int pack_objects(int fd, struct ref *refs, struct extra_have_objects *ext
free(buf);
close(po.out);
po.out = -1;
close(fd);
}

if (finish_command(&po))
Expand Down Expand Up @@ -226,6 +227,9 @@ static void print_helper_status(struct ref *ref)
static int sideband_demux(int in, int out, void *data)
{
int *fd = data;
#ifdef NO_PTHREADS
close(fd[1]);
#endif
int ret = recv_sideband("send-pack", fd[0], out);
close(out);
return ret;
Expand Down

0 comments on commit 73776dc

Please sign in to comment.