diff options
author | Junio C Hamano <gitster@pobox.com> | 2016-10-31 13:15:21 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2016-10-31 13:15:21 -0700 |
commit | 906d6906fb580f2002bfdaadab80da6884bab16f (patch) | |
tree | aa2f6fae92c550a78573b34dcdc343ad363f0d05 /builtin | |
parent | Sync with 2.10.2 (diff) | |
parent | read-cache: make sure file handles are not inherited by child processes (diff) | |
download | tgif-906d6906fb580f2002bfdaadab80da6884bab16f.tar.xz |
Merge branch 'ls/git-open-cloexec'
Git generally does not explicitly close file descriptors that were
open in the parent process when spawning a child process, but most
of the time the child does not want to access them. As Windows does
not allow removing or renaming a file that has a file descriptor
open, a slow-to-exit child can even break the parent process by
holding onto them. Use O_CLOEXEC flag to open files in various
codepaths.
* ls/git-open-cloexec:
read-cache: make sure file handles are not inherited by child processes
sha1_file: open window into packfiles with O_CLOEXEC
sha1_file: rename git_open_noatime() to git_open()
Diffstat (limited to 'builtin')
-rw-r--r-- | builtin/pack-objects.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/builtin/pack-objects.c b/builtin/pack-objects.c index 1e7c2a98a5..0fd52bd6b4 100644 --- a/builtin/pack-objects.c +++ b/builtin/pack-objects.c @@ -720,7 +720,7 @@ static off_t write_reused_pack(struct sha1file *f) if (!is_pack_valid(reuse_packfile)) die("packfile is invalid: %s", reuse_packfile->pack_name); - fd = git_open_noatime(reuse_packfile->pack_name); + fd = git_open(reuse_packfile->pack_name); if (fd < 0) die_errno("unable to open packfile for reuse: %s", reuse_packfile->pack_name); |