summaryrefslogtreecommitdiff
path: root/cache.h
diff options
context:
space:
mode:
authorThomas Rast <trast@inf.ethz.ch>2013-07-16 11:27:36 +0200
committerJunio C Hamano <gitster@pobox.com>2013-07-17 12:50:34 -0700
commit1d999ddd1daa6da2779d21b293ea9b275780bff8 (patch)
tree4c179cf554418c4acf3249a64b021225a5ec6361 /cache.h
parent62e91efafd2030b7dc33ac6450b4e9a316e6ecc6 (diff)
downloadgit-1d999ddd1daa6da2779d21b293ea9b275780bff8.tar.gz
daemon/shell: refactor redirection of 0/1/2 from /dev/null
Both daemon.c and shell.c contain logic to open FDs 0/1/2 from /dev/null if they are not already open. Move the function in daemon.c to setup.c and use it in shell.c, too. While there, remove a 'not' that inverted the meaning of the comment. The point is indeed to *avoid* messing up. Signed-off-by: Thomas Rast <trast@inf.ethz.ch> Signed-off-by: Junio C Hamano <gitster@pobox.com>
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 3622e18415..91974710c3 100644
--- a/cache.h
+++ b/cache.h
@@ -400,6 +400,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)
/*