summaryrefslogtreecommitdiff
path: root/benchmarks
diff options
context:
space:
mode:
authorjdolecek <jdolecek>2001-09-22 15:25:32 +0000
committerjdolecek <jdolecek>2001-09-22 15:25:32 +0000
commit4bd17314270f55e271188366a7dac7463bff54b9 (patch)
tree4552acaa4244f8db83818074138a2fe9769bc951 /benchmarks
parent57e0a16cbe1be7baf9bf9bc822d5d3351e69d2d9 (diff)
downloadpkgsrc-4bd17314270f55e271188366a7dac7463bff54b9.tar.gz
bw_pipe.c: close pipe descriptors as appropriate
Diffstat (limited to 'benchmarks')
-rw-r--r--benchmarks/hbench/distinfo3
-rw-r--r--benchmarks/hbench/patches/patch-al30
2 files changed, 32 insertions, 1 deletions
diff --git a/benchmarks/hbench/distinfo b/benchmarks/hbench/distinfo
index 2f211f9a566..4af765ae148 100644
--- a/benchmarks/hbench/distinfo
+++ b/benchmarks/hbench/distinfo
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.2 2001/04/20 09:13:24 agc Exp $
+$NetBSD: distinfo,v 1.3 2001/09/22 15:25:32 jdolecek Exp $
SHA1 (hbench-OS-1.0.tar.gz) = f8461fee712e354072f2764496403a50c1543c24
Size (hbench-OS-1.0.tar.gz) = 205666 bytes
@@ -13,3 +13,4 @@ SHA1 (patch-ah) = 6c01c679b394985d0570df4fe29c09642cbde6c3
SHA1 (patch-ai) = d59d05c9d73aa4c06f5ac5153a069694a4267fd1
SHA1 (patch-aj) = 7bca0c1062626b5c03f04b7bce17f7c2d8c14231
SHA1 (patch-ak) = 986d86c1b6d6850585cde8cb9ffd119fbe2351ee
+SHA1 (patch-al) = a94603837789248bff873ec787ede901dd1ed215
diff --git a/benchmarks/hbench/patches/patch-al b/benchmarks/hbench/patches/patch-al
new file mode 100644
index 00000000000..440c8da07ca
--- /dev/null
+++ b/benchmarks/hbench/patches/patch-al
@@ -0,0 +1,30 @@
+$NetBSD: patch-al,v 1.1 2001/09/22 15:25:33 jdolecek Exp $
+
+--- bw_pipe.c.orig Fri Sep 21 18:39:15 2001
++++ bw_pipe.c Fri Sep 21 18:39:48 2001
+@@ -147,6 +147,8 @@ do_pipexfer(num_iter, t)
+ /* Spawn off a writer, then time the read */
+ switch (fork()) {
+ case 0: /* writer */
++ close(pipes[0]);
++
+ while ((done < todo) &&
+ ((n = write(pipes[1], buf, bufsize)) > 0))
+ done += n;
+@@ -159,6 +161,8 @@ do_pipexfer(num_iter, t)
+ /*NOTREACHED*/
+
+ default: /* reader */
++ close(pipes[1]);
++
+ /* wait for writer */
+ sleep(1);
+
+@@ -168,6 +172,7 @@ do_pipexfer(num_iter, t)
+ done += n;
+ *t = stop(); /* stop timing */
+
++ close(pipes[0]);
+ wait(&termstat); /* wait for writer to exit */
+ }
+