diff options
author | Bruno Haible <bruno@clisp.org> | 2003-09-15 19:06:16 +0000 |
---|---|---|
committer | Bruno Haible <bruno@clisp.org> | 2009-06-23 12:10:59 +0200 |
commit | d5d1ae3b3c3ae2f837740e5f5d65326197ccdb98 (patch) | |
tree | 8fbe45763c2c1849a39b9d5e391ed100aa9e28c2 /gettext-tools/src/msgexec.c | |
parent | 3f0ee8caa6c510ac4b025e56958c69734282ca8f (diff) | |
download | external_gettext-d5d1ae3b3c3ae2f837740e5f5d65326197ccdb98.zip external_gettext-d5d1ae3b3c3ae2f837740e5f5d65326197ccdb98.tar.gz external_gettext-d5d1ae3b3c3ae2f837740e5f5d65326197ccdb98.tar.bz2 |
Check for write error on stdout when the program exits.
Diffstat (limited to 'gettext-tools/src/msgexec.c')
-rw-r--r-- | gettext-tools/src/msgexec.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/gettext-tools/src/msgexec.c b/gettext-tools/src/msgexec.c index 42188ff..01f1066 100644 --- a/gettext-tools/src/msgexec.c +++ b/gettext-tools/src/msgexec.c @@ -33,6 +33,7 @@ # include <unistd.h> #endif +#include "closeout.h" #include "dir-list.h" #include "error.h" #include "xerror.h" @@ -115,6 +116,9 @@ main (int argc, char **argv) bindtextdomain (PACKAGE, relocate (LOCALEDIR)); textdomain (PACKAGE); + /* Ensure that write errors on stdout are detected. */ + atexit (close_stdout); + /* Set default values for variables. */ do_help = false; do_version = false; |