summaryrefslogtreecommitdiffstats
path: root/gettext-tools/src/msgcomm.c
diff options
context:
space:
mode:
Diffstat (limited to 'gettext-tools/src/msgcomm.c')
-rw-r--r--gettext-tools/src/msgcomm.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/gettext-tools/src/msgcomm.c b/gettext-tools/src/msgcomm.c
index 206ba1c..5f18297 100644
--- a/gettext-tools/src/msgcomm.c
+++ b/gettext-tools/src/msgcomm.c
@@ -27,6 +27,7 @@
#include <stdio.h>
#include <stdlib.h>
+#include "closeout.h"
#include "dir-list.h"
#include "str-list.h"
#include "file-list.h"
@@ -119,6 +120,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. */
more_than = -1;
less_than = -1;