summaryrefslogtreecommitdiff
path: root/usr.bin/progress/progress.c
diff options
context:
space:
mode:
authorross <ross@NetBSD.org>2003-02-10 09:10:01 +0000
committerross <ross@NetBSD.org>2003-02-10 09:10:01 +0000
commit182f33ad445e71df53474cb30f4d2b2be1c71ab2 (patch)
tree4682c1b19815fb40868bbd957ec7b172ee8ce6a8 /usr.bin/progress/progress.c
parent73f7f91a7484a16931a910e6198f864403df6a32 (diff)
Fix a race that can abort a sysinst run.
Closes bin/20275, thank you Takao Shinohara: good analysis. This program appeared less than 3 weeks ago and it has already been pulled up to 1.6.1? At the last minute? And with serious bugs? ISTM that the release branch isn't supposed to work that way. It isn't stable, it had 4 patches in 2 days, and has averaged a patch every 4 days during its short lifetime.
Diffstat (limited to 'usr.bin/progress/progress.c')
-rw-r--r--usr.bin/progress/progress.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/usr.bin/progress/progress.c b/usr.bin/progress/progress.c
index f5422de0914..c9bd42b0dfc 100644
--- a/usr.bin/progress/progress.c
+++ b/usr.bin/progress/progress.c
@@ -1,4 +1,4 @@
-/* $NetBSD: progress.c,v 1.5 2003/01/22 10:44:17 agc Exp $ */
+/* $NetBSD: progress.c,v 1.6 2003/02/10 09:10:01 ross Exp $ */
/*-
* Copyright (c) 2003 The NetBSD Foundation, Inc.
@@ -34,7 +34,7 @@
#include <sys/cdefs.h>
#ifndef lint
-__RCSID("$NetBSD: progress.c,v 1.5 2003/01/22 10:44:17 agc Exp $");
+__RCSID("$NetBSD: progress.c,v 1.6 2003/02/10 09:10:01 ross Exp $");
#endif /* not lint */
#include <sys/types.h>
@@ -211,7 +211,8 @@ main(int argc, char *argv[])
(unsigned) nr);
close(outpipe[1]);
- wait(&waitstat);
+ while(wait(&waitstat) != -1)
+ continue;
progressmeter(1);
return 0;