summaryrefslogtreecommitdiff
path: root/cache.h
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2013-07-22 18:23:35 (GMT)
committerJunio C Hamano <gitster@pobox.com>2013-07-22 18:23:35 (GMT)
commitcb29dfde484e459e4329281151b05ef1c5ad462c (patch)
tree7d99f8e0d925b8369757793d6a9f65d27691a4a5 /cache.h
parent5701c3d701d3932d853ffb9f75ee8745fae21209 (diff)
parenta11c39646c14600d588ca55fcfe3c244b66047c7 (diff)
downloadgit-cb29dfde484e459e4329281151b05ef1c5ad462c.zip
git-cb29dfde484e459e4329281151b05ef1c5ad462c.tar.gz
git-cb29dfde484e459e4329281151b05ef1c5ad462c.tar.bz2
Merge branch 'tr/protect-low-3-fds'
When "git" is spawned in such a way that any of the low 3 file descriptors is closed, our first open() may yield file descriptor 2, and writing error message to it would screw things up in a big way. * tr/protect-low-3-fds: git: ensure 0/1/2 are open in main() daemon/shell: refactor redirection of 0/1/2 from /dev/null
Diffstat (limited to 'cache.h')
-rw-r--r--cache.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/cache.h b/cache.h
index 2d06169..b89409b 100644
--- a/cache.h
+++ b/cache.h
@@ -425,6 +425,8 @@ extern int path_inside_repo(const char *prefix, const char *path);
extern int set_git_dir_init(const char *git_dir, const char *real_git_dir, int);
extern int init_db(const char *template_dir, unsigned int flags);
+extern void sanitize_stdfds(void);
+
#define alloc_nr(x) (((x)+16)*3/2)
/*