diff options
author | Johannes Sixt <johannes.sixt@telecom.at> | 2007-11-17 23:09:28 +0100 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2007-11-17 20:27:29 -0800 |
commit | 1f759eeede0597580be8ce26305550350e3c017a (patch) | |
tree | 4fd24e79e76c697ebf1bf670c2980d4526910ac0 /Documentation/git-mailinfo.txt | |
parent | rehabilitate some t5302 tests on 32-bit off_t machines (diff) | |
download | tgif-1f759eeede0597580be8ce26305550350e3c017a.tar.xz |
fetch-pack: Prepare for a side-band demultiplexer in a thread.
get_pack() receives a pair of file descriptors that communicate with
upload-pack at the remote end. In order to support the case where the
side-band demultiplexer runs in a thread, and, hence, in the same process
as the main routine, we must not close the readable file descriptor early.
The handling of the readable fd is changed in the case where upload-pack
supports side-band communication: The old code closed the fd after it was
inherited to the side-band demultiplexer process. Now we do not close it.
The caller (do_fetch_pack) will close it later anyway. The demultiplexer
is the only reader, it does not matter that the fd remains open in the
main process as well as in unpack-objects/index-pack, which inherits it.
The writable fd is not needed in get_pack(), hence, the old code closed
the fd. For symmetry with the readable fd, we now do not close it; the
caller (do_fetch_pack) will close it later anyway. Therefore, the new
behavior is that the channel now remains open during the entire
conversation, but this has no ill effects because upload-pack does not read
from it once it has begun to send the pack data. For the same reason it
does not matter that the writable fd is now inherited to the demultiplexer
and unpack-objects/index-pack processes.
Signed-off-by: Johannes Sixt <johannes.sixt@telecom.at>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'Documentation/git-mailinfo.txt')
0 files changed, 0 insertions, 0 deletions