summaryrefslogtreecommitdiffstats
path: root/login-utils/newgrp.c
diff options
context:
space:
mode:
authorSami Kerola2012-04-04 19:58:34 +0200
committerSami Kerola2012-04-04 19:58:34 +0200
commit439cdf1e2475d2f6622c151419f90c7da6de1434 (patch)
treec7e0fac0bef7831d7603fd95e8ff30cc805843da /login-utils/newgrp.c
parentmisc-utils: verify writing to streams was successful (diff)
downloadkernel-qcow2-util-linux-439cdf1e2475d2f6622c151419f90c7da6de1434.tar.gz
kernel-qcow2-util-linux-439cdf1e2475d2f6622c151419f90c7da6de1434.tar.xz
kernel-qcow2-util-linux-439cdf1e2475d2f6622c151419f90c7da6de1434.zip
login-utils: verify writing to streams was successful
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
Diffstat (limited to 'login-utils/newgrp.c')
-rw-r--r--login-utils/newgrp.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/login-utils/newgrp.c b/login-utils/newgrp.c
index 707c5893a..4f6de12a1 100644
--- a/login-utils/newgrp.c
+++ b/login-utils/newgrp.c
@@ -29,6 +29,7 @@
#endif
#include "c.h"
+#include "closestream.h"
#include "nls.h"
#include "pathnames.h"
@@ -132,6 +133,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) {