summaryrefslogtreecommitdiffstats
path: root/text-utils/rev.c
diff options
context:
space:
mode:
Diffstat (limited to 'text-utils/rev.c')
-rw-r--r--text-utils/rev.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/text-utils/rev.c b/text-utils/rev.c
index 8a1666800..3c64c12d1 100644
--- a/text-utils/rev.c
+++ b/text-utils/rev.c
@@ -62,6 +62,7 @@
#include "xalloc.h"
#include "widechar.h"
#include "c.h"
+#include "closestream.h"
wchar_t *buf;
@@ -96,6 +97,7 @@ int main(int argc, char *argv[])
setlocale(LC_ALL, "");
bindtextdomain(PACKAGE, LOCALEDIR);
textdomain(PACKAGE);
+ atexit(close_stdout);
signal(SIGINT, sig_handler);
signal(SIGTERM, sig_handler);