Merge branch 'js/maint-1.6.6-send-pack-stateless-rpc-deadlock-fix' into 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").
This commit is contained in:
commit
73776dc1eb
@ -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))
|
||||
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user