announce-gen: detect write failure
authorJim Meyering <meyering@redhat.com>
Sat, 22 Aug 2009 08:02:19 +0000 (10:02 +0200)
committerJim Meyering <meyering@redhat.com>
Sat, 22 Aug 2009 08:02:19 +0000 (10:02 +0200)
* build-aux/announce-gen: Add Coda.

ChangeLog
build-aux/announce-gen

index 841212e..958cab4 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2009-08-22  Jim Meyering  <meyering@redhat.com>
+
+       announce-gen: detect write failure
+       * build-aux/announce-gen: Add Coda.
+
 2009-08-19  Akim Demaille  <demaille@gostai.com>
 
        bootstrap: --help to stdout.
index e5e7491..ca17a22 100755 (executable)
@@ -1,7 +1,7 @@
 #!/usr/bin/perl -w
 # Generate a release announcement message.
 
-my $VERSION = '2009-03-05 09:52'; # UTC
+my $VERSION = '2009-08-21 21:46'; # UTC
 # The definition above must lie within the first 8 lines in order
 # for the Emacs time-stamp write hook (at end) to update it.
 # If you change this file with Emacs, please let the write hook
@@ -500,6 +500,14 @@ EOF
   exit 0;
 }
 
+# use File::Coda; # http://meyering.net/code/Coda/
+END {
+  defined fileno STDOUT or return;
+  close STDOUT and return;
+  warn "$ME: failed to close standard output: $!\n";
+  $? ||= 1;
+}
+
 ### Setup "GNU" style for perl-mode and cperl-mode.
 ## Local Variables:
 ## perl-indent-level: 2