diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/ChangeLog | 5 | ||||
-rw-r--r-- | test/iolint.awk | 5 | ||||
-rw-r--r-- | test/iolint.ok | 8 |
3 files changed, 10 insertions, 8 deletions
diff --git a/test/ChangeLog b/test/ChangeLog index 8563e076..8bb20553 100644 --- a/test/ChangeLog +++ b/test/ChangeLog @@ -1,3 +1,8 @@ +2020-10-05 Arnold D. Robbins <arnold@skeeve.com> + + * iolint.awk, iolint.ok: Remove |& test to cat. It was + inherently racy. + 2020-10-01 Arnold D. Robbins <arnold@skeeve.com> * iolint.awk, iolint.ok: Adjust output to cat for exit status diff --git a/test/iolint.awk b/test/iolint.awk index b6c8eeb4..3f3bb22f 100644 --- a/test/iolint.awk +++ b/test/iolint.awk @@ -54,13 +54,14 @@ BEGIN { # `%.*s' used for output file and output pipe # `%.*s' used for output file and two-way pipe # `%.*s' used for output pipe and two-way pipe + # Not doing |& due to race condition and signals. sigh exec_cat = "exec cat" print "/bin/cat \"$@\"" > exec_cat print "hello" | exec_cat - print "hello" |& exec_cat - print close(exec_cat) + # print "hello" |& exec_cat print close(exec_cat) print close(exec_cat) + # print close(exec_cat) fflush() # `%.*s' used for input pipe and output pipe diff --git a/test/iolint.ok b/test/iolint.ok index 873b0244..5a4ae823 100644 --- a/test/iolint.ok +++ b/test/iolint.ok @@ -23,15 +23,11 @@ b1946ac92492d2347c6235b4d2611184 - gawk: ./iolint.awk:49: warning: `echo hello' used for input pipe and output file 0 0 -gawk: ./iolint.awk:59: warning: `exec cat' used for output file and output pipe -gawk: ./iolint.awk:60: warning: `exec cat' used for output pipe and two-way pipe -gawk: ./iolint.awk:60: warning: `exec cat' used for output file and two-way pipe +gawk: ./iolint.awk:60: warning: `exec cat' used for output file and output pipe hello -gawk: ./iolint.awk:61: warning: failure status (269) on two-way pipe close of `exec cat': Success -269 0 0 -gawk: ./iolint.awk:68: warning: `echo hello' used for input pipe and output pipe +gawk: ./iolint.awk:69: warning: `echo hello' used for input pipe and output pipe hello 0 0 |