summaryrefslogtreecommitdiffstats
path: root/sys-utils/pivot_root.c
diff options
context:
space:
mode:
authorSami Kerola2012-04-04 19:49:40 +0200
committerSami Kerola2012-04-04 19:49:40 +0200
commitefb8854f4cfa335f3ad72d79a84589110c2a8e87 (patch)
tree83d1c6e33bb7afacb40bc81772d390d009fd70ac /sys-utils/pivot_root.c
parentterm-utils: verify writing to streams was successful (diff)
downloadkernel-qcow2-util-linux-efb8854f4cfa335f3ad72d79a84589110c2a8e87.tar.gz
kernel-qcow2-util-linux-efb8854f4cfa335f3ad72d79a84589110c2a8e87.tar.xz
kernel-qcow2-util-linux-efb8854f4cfa335f3ad72d79a84589110c2a8e87.zip
sys-utils: verify writing to streams was successful
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
Diffstat (limited to 'sys-utils/pivot_root.c')
-rw-r--r--sys-utils/pivot_root.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/sys-utils/pivot_root.c b/sys-utils/pivot_root.c
index 044aab226..31ceabb78 100644
--- a/sys-utils/pivot_root.c
+++ b/sys-utils/pivot_root.c
@@ -23,6 +23,7 @@
#include "c.h"
#include "nls.h"
+#include "closestream.h"
#define pivot_root(new_root,put_old) syscall(SYS_pivot_root,new_root,put_old)
@@ -50,6 +51,7 @@ int main(int argc, char **argv)
setlocale(LC_ALL, "");
bindtextdomain(PACKAGE, LOCALEDIR);
textdomain(PACKAGE);
+ atexit(close_stdout);
while ((ch = getopt_long(argc, argv, "Vh", longopts, NULL)) != -1)
switch (ch) {