diff options
author | Sami Kerola | 2012-04-04 19:58:34 +0200 |
---|---|---|
committer | Sami Kerola | 2012-04-04 19:58:34 +0200 |
commit | 439cdf1e2475d2f6622c151419f90c7da6de1434 (patch) | |
tree | c7e0fac0bef7831d7603fd95e8ff30cc805843da /login-utils/logindefs.c | |
parent | misc-utils: verify writing to streams was successful (diff) | |
download | kernel-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/logindefs.c')
-rw-r--r-- | login-utils/logindefs.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/login-utils/logindefs.c b/login-utils/logindefs.c index 7b801cf70..ff7266ea1 100644 --- a/login-utils/logindefs.c +++ b/login-utils/logindefs.c @@ -29,6 +29,7 @@ #include <sys/syslog.h> #include "c.h" +#include "closestream.h" #include "logindefs.h" #include "nls.h" #include "pathnames.h" @@ -252,6 +253,7 @@ int logindefs_setenv(const char *name, const char *conf, const char *dflt) int main(int argc, char *argv[]) { char *name, *type; + atexit(close_stdout); if (argc <= 1) errx(EXIT_FAILURE, "usage: %s <filename> " |