diff options
Diffstat (limited to 'text-utils/column.c')
-rw-r--r-- | text-utils/column.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/text-utils/column.c b/text-utils/column.c index 9d5befc13..b210a9381 100644 --- a/text-utils/column.c +++ b/text-utils/column.c @@ -55,6 +55,7 @@ #include "c.h" #include "xalloc.h" #include "strutils.h" +#include "closestream.h" #ifdef HAVE_WIDECHAR #define wcs_width(s) wcswidth(s,wcslen(s)) @@ -131,6 +132,7 @@ int main(int argc, char **argv) setlocale(LC_ALL, ""); bindtextdomain(PACKAGE, LOCALEDIR); textdomain(PACKAGE); + atexit(close_stdout); if (ioctl(STDIN_FILENO, TIOCGWINSZ, &win) == -1 || !win.ws_col) { char *p; @@ -203,9 +205,6 @@ int main(int argc, char **argv) free(list[i]); free(list); - if (ferror(stdout) || fclose(stdout)) - eval += EXIT_FAILURE; - if (eval == 0) return EXIT_SUCCESS; else |