[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
FYI: clean-up patches for autoscan
From: |
Jim Meyering |
Subject: |
FYI: clean-up patches for autoscan |
Date: |
11 Feb 2001 17:43:58 +0100 |
User-agent: |
Gnus/5.09 (Gnus v5.9.0) Emacs/21.0.98 |
Here's the first (already checked in):
Ensure that even `autoscan --version' fails when e.g.,
writing to a full disk.
* autoscan.pl (END): New function.
This command should fail:
autoscan --version > /dev/full
Until I applied the change below, it succeeded.
Index: autoscan.pl
===================================================================
RCS file: /cvsroot/autoconf/autoconf/autoscan.pl,v
retrieving revision 1.41
retrieving revision 1.42
diff -u -r1.41 -r1.42
--- autoscan.pl 2001/02/02 18:15:37 1.41
+++ autoscan.pl 2001/02/11 16:38:44 1.42
@@ -53,6 +53,17 @@
my $configure_scan = 'configure.scan';
+
+# Exit nonzero whenever closing STDOUT fails.
+sub END
+{
+ use POSIX qw (_exit);
+ # This is required if the code might send any output to stdout
+ # E.g., even --version or --help. So it's best to do it unconditionally.
+ close STDOUT
+ or (warn "$me: closing standard output: $!\n"), _exit (1);
+}
+
# find_autoconf
# -------------
# Find the lib files and autoconf.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- FYI: clean-up patches for autoscan,
Jim Meyering <=