[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[SCM] gawk branch, gawk-5.1-stable, updated. gawk-4.1.0-4361-ge03c882
From: |
Andrew J. Schorr |
Subject: |
[SCM] gawk branch, gawk-5.1-stable, updated. gawk-4.1.0-4361-ge03c882 |
Date: |
Tue, 7 Dec 2021 12:00:58 -0500 (EST) |
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "gawk".
The branch, gawk-5.1-stable has been updated
via e03c8822c48bedfe6cc7fbd5a9382d9630de6494 (commit)
from 7d8a75a766b17fe395c0a82050d314c2dea57f3e (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
http://git.sv.gnu.org/cgit/gawk.git/commit/?id=e03c8822c48bedfe6cc7fbd5a9382d9630de6494
commit e03c8822c48bedfe6cc7fbd5a9382d9630de6494
Author: Andrew J. Schorr <aschorr@telemetry-investments.com>
Date: Tue Dec 7 12:00:22 2021 -0500
Reorder statements in iolint to try to eliminate a race condition.
diff --git a/test/ChangeLog b/test/ChangeLog
index 3f36817..1fb76ba 100644
--- a/test/ChangeLog
+++ b/test/ChangeLog
@@ -1,3 +1,10 @@
+2021-12-07 Andrew J. Schorr <aschorr@telemetry-investments.com>
+
+ * iolint.awk, iolint.ok: Reorder "cat" pipe/output file test to reduce
+ the likelihood of a race condition, since close operates on the
+ most-recently-used item. Thanks to Miguel Pineiro Jr.,
+ <mpj@pineiro.cc>, for suggesting the fix.
+
2021-11-21 Arnold D. Robbins <arnold@skeeve.com>
* Makefile.am (EXTRA_DIST): stupid5, new test.
diff --git a/test/iolint.awk b/test/iolint.awk
index 042f743..3ebaf43 100644
--- a/test/iolint.awk
+++ b/test/iolint.awk
@@ -49,8 +49,8 @@ BEGIN {
# `%.*s' used for output pipe and two-way pipe
# Not doing |& due to race condition and signals. sigh
cat = "cat"
- print "hello" | "cat"
print "/bin/cat \"$@\"" > "cat"
+ print "hello" | "cat"
print close("cat")
print close("cat")
fflush()
diff --git a/test/iolint.ok b/test/iolint.ok
index 7a165aa..860bcfb 100644
--- a/test/iolint.ok
+++ b/test/iolint.ok
@@ -20,9 +20,9 @@ gawk: iolint.awk:42: warning: `echo hello' used for input
pipe and output file
0
0
gawk: iolint.awk:53: warning: `cat' used for output file and output pipe
-0
hello
0
+0
gawk: iolint.awk:67: warning: `eval $CMD_TO_RUN' used for input pipe and
output pipe
0
0
-----------------------------------------------------------------------
Summary of changes:
test/ChangeLog | 7 +++++++
test/iolint.awk | 2 +-
test/iolint.ok | 2 +-
3 files changed, 9 insertions(+), 2 deletions(-)
hooks/post-receive
--
gawk
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [SCM] gawk branch, gawk-5.1-stable, updated. gawk-4.1.0-4361-ge03c882,
Andrew J. Schorr <=