summaryrefslogtreecommitdiff
path: root/contrib/completion
diff options
context:
space:
mode:
authorLibravatar Mike Hommey <mh@glandium.org>2019-05-16 09:37:35 +0900
committerLibravatar Junio C Hamano <gitster@pobox.com>2019-05-16 18:02:30 +0900
commit8b3554279cb2608118b2881744135fb6f3069c32 (patch)
tree977fdf0d99b396486bd5c21d27955603e87a2dc8 /contrib/completion
parentmingw: allow building with an MSYS2 runtime v3.x (diff)
downloadtgif-8b3554279cb2608118b2881744135fb6f3069c32.tar.xz
dup() the input fd for fast-import used for remote helpers
When a remote helper exposes the "import" capability, stdout of the helper is sent to stdin of a new fast-import process. This is done by setting the corresponding child_process's in field to the value of the out field of the helper child_process. The child_process API is defined to close the file descriptors it's given when calling start_command. This means when start_command is called for the fast-import process, its input fd (the output fd of the helper), is closed. But when the transport helper is later destroyed, in disconnect_helper, its input and output are closed, which means close() is called with an invalid fd (since it was already closed as per above). Or worse, with a valid fd owned by something else (since fd numbers can be reused). Signed-off-by: Mike Hommey <mh@glandium.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'contrib/completion')
0 files changed, 0 insertions, 0 deletions