sha1_file: open window into packfiles with O_CLOEXEC
commitcd66ada06588f797a424dd1f6da1c6bb51de1660
authorLars Schneider <larsxschneider@gmail.com>
Mon, 24 Oct 2016 18:02:59 +0000 (24 20:02 +0200)
committerJunio C Hamano <gitster@pobox.com>
Tue, 25 Oct 2016 18:09:54 +0000 (25 11:09 -0700)
tree0dc5420dbe93ec54c0982f320b899c516a7c967c
parenta5436b57941d99302a4cf68373da6288c11f0340
sha1_file: open window into packfiles with O_CLOEXEC

All processes that the Git main process spawns inherit the open file
descriptors of the main process. These leaked file descriptors can
cause problems.

Use the O_CLOEXEC flag similar to 05d1ed61 to fix the leaked file
descriptors.

Signed-off-by: Lars Schneider <larsxschneider@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
sha1_file.c