sha1_file: open window into packfiles with O_CLOEXEC
authorLars Schneider <redacted>
Mon, 24 Oct 2016 18:02:59 +0000 (20:02 +0200)
committerJunio C Hamano <redacted>
Tue, 25 Oct 2016 18:09:54 +0000 (11:09 -0700)
commitcd66ada06588f797a424dd1f6da1c6bb51de1660
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 <redacted>
Signed-off-by: Junio C Hamano <redacted>
sha1_file.c
git clone https://git.99rst.org/PROJECT