summaryrefslogtreecommitdiffstats
path: root/sys-utils/dmesg.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys-utils/dmesg.c')
-rw-r--r--sys-utils/dmesg.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/sys-utils/dmesg.c b/sys-utils/dmesg.c
index 9cbe51658..de4b3abc6 100644
--- a/sys-utils/dmesg.c
+++ b/sys-utils/dmesg.c
@@ -29,6 +29,7 @@
#include "widechar.h"
#include "writeall.h"
#include "bitops.h"
+#include "closestream.h"
/* Close the log. Currently a NOP. */
#define SYSLOG_ACTION_CLOSE 0
@@ -688,6 +689,7 @@ int main(int argc, char *argv[])
setlocale(LC_ALL, "");
bindtextdomain(PACKAGE, LOCALEDIR);
textdomain(PACKAGE);
+ atexit(close_stdout);
while ((c = getopt_long(argc, argv, "CcDdEF:f:hkl:n:rs:TtuVx",
longopts, NULL)) != -1) {