summaryrefslogtreecommitdiff
path: root/cache.h
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2016-10-31 20:15:21 (GMT)
committerJunio C Hamano <gitster@pobox.com>2016-10-31 20:15:21 (GMT)
commit906d6906fb580f2002bfdaadab80da6884bab16f (patch)
treeaa2f6fae92c550a78573b34dcdc343ad363f0d05 /cache.h
parent7805bda2ac68c659b0042f45473723d9fdcece74 (diff)
parenta0a6cb96625cebe8590841c469bfbb461a132ae3 (diff)
downloadgit-906d6906fb580f2002bfdaadab80da6884bab16f.zip
git-906d6906fb580f2002bfdaadab80da6884bab16f.tar.gz
git-906d6906fb580f2002bfdaadab80da6884bab16f.tar.bz2
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 'cache.h')
-rw-r--r--cache.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/cache.h b/cache.h
index 1be6526..a50a61a 100644
--- a/cache.h
+++ b/cache.h
@@ -1125,7 +1125,7 @@ extern int write_sha1_file(const void *buf, unsigned long len, const char *type,
extern int hash_sha1_file_literally(const void *buf, unsigned long len, const char *type, unsigned char *sha1, unsigned flags);
extern int pretend_sha1_file(void *, unsigned long, enum object_type, unsigned char *);
extern int force_object_loose(const unsigned char *sha1, time_t mtime);
-extern int git_open_noatime(const char *name);
+extern int git_open(const char *name);
extern void *map_sha1_file(const unsigned char *sha1, unsigned long *size);
extern int unpack_sha1_header(git_zstream *stream, unsigned char *map, unsigned long mapsize, void *buffer, unsigned long bufsiz);
extern int parse_sha1_header(const char *hdr, unsigned long *sizep);