aboutsummaryrefslogtreecommitdiff
path: root/FIXES
diff options
context:
space:
mode:
authorMartijn Dekker <martijn@inlv.org>2020-01-17 13:02:57 +0100
committerArnold Robbins <arnold@skeeve.com>2020-01-17 14:02:57 +0200
commitfed1a562c3d1f3cf3cac0dd1413679191ac43002 (patch)
treecbc954dcdcecd54f4cc7c749420c7a375d20ec94 /FIXES
parent2976507cc10587a8d6d540c099b1d481547d7807 (diff)
downloadone-true-awk-fed1a562c3d1f3cf3cac0dd1413679191ac43002.tar.gz
Make I/O errors fatal instead of mere warnings (#63)
An input/output error indicates a fatal condition, even if it occurs when closing a file. Awk should not return success on I/O error, but treat I/O errors as it already treats write errors. Test case: $ (trap '' PIPE; awk 'BEGIN { print "hi"; }'; echo "E $?" >&2) | : awk: i/o error occurred while closing /dev/stdout source line number 1 E 2 The test case pipes a line into a dummy command that reads no input, with SIGPIPE ignored so we rely on awk's own I/O checking. No write error is detected, because the pipe is buffered; the broken pipe is only detected as an I/O error on closing stdout. Before this commit, "E 0" was printed (indicating status 0/success) because an I/O error merely produced a warning. A shell script was unable to detect the I/O error using the exit status.
Diffstat (limited to 'FIXES')
-rw-r--r--FIXES4
1 files changed, 4 insertions, 0 deletions
diff --git a/FIXES b/FIXES
index 6889e30..aac4a4a 100644
--- a/FIXES
+++ b/FIXES
@@ -25,6 +25,10 @@ THIS SOFTWARE.
This file lists all bug fixes, changes, etc., made since the AWK book
was sent to the printers in August, 1987.
+January 9, 2020:
+ Input/output errors on closing files are now fatal instead of
+ mere warnings. Thanks to Martijn Dekker <martijn@inlv.org>.
+
January 5, 2020:
Fix a bug in the concatentation of two string constants into
one done in the grammar. Fixes GitHub issue #61. Thanks