summaryrefslogtreecommitdiffstats
path: root/gettext-tools/src/msgmerge.c
diff options
context:
space:
mode:
Diffstat (limited to 'gettext-tools/src/msgmerge.c')
-rw-r--r--gettext-tools/src/msgmerge.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/gettext-tools/src/msgmerge.c b/gettext-tools/src/msgmerge.c
index a2e3591..0ff0262 100644
--- a/gettext-tools/src/msgmerge.c
+++ b/gettext-tools/src/msgmerge.c
@@ -29,6 +29,7 @@
#include <string.h>
#include <locale.h>
+#include "closeout.h"
#include "dir-list.h"
#include "error.h"
#include "error-progname.h"
@@ -159,6 +160,9 @@ main (int argc, char **argv)
bindtextdomain (PACKAGE, relocate (LOCALEDIR));
textdomain (PACKAGE);
+ /* Ensure that write errors on stdout are detected. */
+ atexit (close_stdout);
+
/* Set default values for variables. */
do_help = false;
do_version = false;