X-Git-Url: http://git.annexia.org/?a=blobdiff_plain;f=fish%2Ffish.c;h=a4069d6dca8aaf79c4b37e89e59bda770a4eca0a;hb=97ef6a82ed32404b751a23b6658e0f9c7ab3298c;hp=156147a3ae0448cb1258a977da7f5f644302e185;hpb=8e6d1e1a31a69589fde10e3e230620f1e9d27866;p=libguestfs.git diff --git a/fish/fish.c b/fish/fish.c index 156147a..a4069d6 100644 --- a/fish/fish.c +++ b/fish/fish.c @@ -18,8 +18,6 @@ #include -#define _GNU_SOURCE // for strchrnul - #include #include #include @@ -40,6 +38,7 @@ #include #include "fish.h" +#include "closeout.h" #include "progname.h" struct mp { @@ -140,6 +139,8 @@ main (int argc, char *argv[]) /* Set global program name that is not polluted with libtool artifacts. */ set_program_name (argv[0]); + atexit (close_stdout); + enum { HELP_OPTION = CHAR_MAX + 1 }; static const char *options = "a:Df:h::im:nrv?Vx";