X-Git-Url: http://git.annexia.org/?a=blobdiff_plain;f=fish%2Ffish.c;h=a4069d6dca8aaf79c4b37e89e59bda770a4eca0a;hb=f482e7ea665938152518fe15cd71cfe882dd2b30;hp=91c5dadd6b6fdd918ad364930b04d7ac59999d06;hpb=6cd965e007f65d6e62872c6ddd782f1de06046e3;p=libguestfs.git diff --git a/fish/fish.c b/fish/fish.c index 91c5dad..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"; @@ -326,8 +327,6 @@ main (int argc, char *argv[]) usage (0); default: - fprintf (stderr, _("%s: unexpected command line option 0x%x\n"), - program_name, c); usage (1); } }