Hello Paul, * Paul Eggert wrote on Sat, Sep 16, 2006 at 10:34:52PM CEST: > Ralf Wildenhues <[EMAIL PROTECTED]> writes: > > > * gnulib-tool (func_exit): New function, to allow to pass the > > exit status portably through the trap. Use everywhere. > > (--help, --version): Signal a write error. > > (trap): catch SIGPIPE, for write errors. > > Exit at the end of the trap, with the correct exit status. > > I like the idea; the problem has bugged me as well.
Thanks. I've applied this, assuming that Bruno's silence means consent. ;-) I have another proposal in this area: --version output should be done at once if possible, in order not to trigger unnecessary SIGPIPEs; see http://lists.gnu.org/archive/html/bug-libtool/2006-04/msg00003.html for a precedent case. OK to apply as well? Cheers, Ralf * gnulib-tool (func_version): Create output all at once, to avoid triggering unnecessary SIGPIPEs. Index: gnulib-tool =================================================================== RCS file: /cvsroot/gnulib/gnulib/gnulib-tool,v retrieving revision 1.168 diff -u -r1.168 gnulib-tool --- gnulib-tool 19 Sep 2006 06:03:02 -0000 1.168 +++ gnulib-tool 19 Sep 2006 06:03:57 -0000 @@ -157,11 +157,12 @@ func_version () { year=`echo "$last_checkin_date" | sed -e 's,/.*$,,'` - echo "$progname (GNU $package) $version" - echo "Copyright (C) $year Free Software Foundation, Inc. + echo "\ +$progname (GNU $package) $version +Copyright (C) $year Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO -warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." - echo "Written by" "Bruno Haible" "and" "Simon Josefsson" +warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +Written by" "Bruno Haible" "and" "Simon Josefsson" } # func_emit_copyright_notice