summaryrefslogtreecommitdiff
path: root/git-compat-util.h
diff options
context:
space:
mode:
authorClemens Buchacher <drizzd@aon.at>2011-07-27 23:32:34 +0200
committerJunio C Hamano <gitster@pobox.com>2011-07-31 18:27:07 -0700
commit3bc4181fde899e02aff89f7c0a47f18d37311cb3 (patch)
treeeacd31e4e1a91b6ad7fb2317b007c5203675e0e6 /git-compat-util.h
parent2579e1d2936ad4e385ef21e5c346d9853d7faa01 (diff)
downloadgit-3bc4181fde899e02aff89f7c0a47f18d37311cb3.tar.gz
error_routine: use parent's stderr if exec fails
The new process's error output may be redirected elsewhere, but if the exec fails, output should still go to the parent's stderr. This has already been done for the die_routine. Do the same for error_routine. Signed-off-by: Clemens Buchacher <drizzd@aon.at> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'git-compat-util.h')
-rw-r--r--git-compat-util.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/git-compat-util.h b/git-compat-util.h
index e0bb81ed8d..041cbdb93e 100644
--- a/git-compat-util.h
+++ b/git-compat-util.h
@@ -236,6 +236,7 @@ extern char *gitbasename(char *);
/* General helper functions */
extern void vreportf(const char *prefix, const char *err, va_list params);
+extern void vwritef(int fd, const char *prefix, const char *err, va_list params);
extern NORETURN void usage(const char *err);
extern NORETURN void usagef(const char *err, ...) __attribute__((format (printf, 1, 2)));
extern NORETURN void die(const char *err, ...) __attribute__((format (printf, 1, 2)));
@@ -244,6 +245,7 @@ extern int error(const char *err, ...) __attribute__((format (printf, 1, 2)));
extern void warning(const char *err, ...) __attribute__((format (printf, 1, 2)));
extern void set_die_routine(NORETURN_PTR void (*routine)(const char *err, va_list params));
+extern void set_error_routine(void (*routine)(const char *err, va_list params));
extern int prefixcmp(const char *str, const char *prefix);
extern int suffixcmp(const char *str, const char *suffix);