aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--test/ChangeLog5
-rw-r--r--test/fork.awk1
-rw-r--r--test/fork2.awk1
3 files changed, 7 insertions, 0 deletions
diff --git a/test/ChangeLog b/test/ChangeLog
index 33d59eee..4f79460f 100644
--- a/test/ChangeLog
+++ b/test/ChangeLog
@@ -1,3 +1,8 @@
+2017-10-12 Arnold D. Robbins <arnold@skeeve.com>
+
+ * fork.awk: Close the file in the parent after reading it.
+ * fork2.awk: Ditto.
+
2017-10-08 Arnold D. Robbins <arnold@skeeve.com>
* Makefile.am (randtest): Minor fix from Andreas for OS/2.
diff --git a/test/fork.awk b/test/fork.awk
index 0b29f9ff..af608ad5 100644
--- a/test/fork.awk
+++ b/test/fork.awk
@@ -20,6 +20,7 @@ BEGIN {
else if ((getline x < fn) != 1)
printf "Error: getline failed on temp file %s\n", fn
else {
+ close(fn) # required on non-POSIX systems
expected = ("pid " pid " ppid " PROCINFO["pid"])
if (x != expected)
printf "Error: child data (%s) != expected (%s)\n", x, expected
diff --git a/test/fork2.awk b/test/fork2.awk
index bd364286..a8ae5622 100644
--- a/test/fork2.awk
+++ b/test/fork2.awk
@@ -22,6 +22,7 @@ BEGIN {
else if ((getline x < fn) != 1)
printf "Error: getline failed on temp file %s\n", fn
else {
+ close(fn) # needed on non-POSIX systems
expected = ("pid " pid " ppid " PROCINFO["pid"])
if (x != expected)
printf "Error: child data (%s) != expected (%s)\n", x, expected