From 090d8c763a50b5b0c83f423a2e943fa928b29d56 Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Tue, 16 Aug 2016 13:35:06 +0200 Subject: include/closestream: define exit codes Signed-off-by: Karel Zak --- include/closestream.h | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'include/closestream.h') diff --git a/include/closestream.h b/include/closestream.h index 7842456fb..2dfe11360 100644 --- a/include/closestream.h +++ b/include/closestream.h @@ -10,6 +10,10 @@ #include "c.h" #include "nls.h" +#ifndef CLOSE_EXIT_CODE +# define CLOSE_EXIT_CODE EXIT_FAILURE +#endif + #ifndef HAVE___FPENDING static inline int __fpending(FILE *stream __attribute__((__unused__))) @@ -42,11 +46,11 @@ close_stdout(void) warn(_("write error")); else warnx(_("write error")); - _exit(EXIT_FAILURE); + _exit(CLOSE_EXIT_CODE); } if (close_stream(stderr) != 0) - _exit(EXIT_FAILURE); + _exit(CLOSE_EXIT_CODE); } #ifndef HAVE_FSYNC -- cgit v1.2.3-55-g7522