From 3bc4181fde899e02aff89f7c0a47f18d37311cb3 Mon Sep 17 00:00:00 2001 From: Clemens Buchacher Date: Wed, 27 Jul 2011 23:32:34 +0200 Subject: 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 Signed-off-by: Junio C Hamano --- git-compat-util.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'git-compat-util.h') 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); -- cgit v1.2.3