]> git.cameronkatri.com Git - bsd-progress.git/commitdiff
Fix a race that can abort a sysinst run.
authorross <ross@NetBSD.org>
Mon, 10 Feb 2003 09:10:01 +0000 (09:10 +0000)
committerross <ross@NetBSD.org>
Mon, 10 Feb 2003 09:10:01 +0000 (09:10 +0000)
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.

progress.c

index f5422de0914fe54acee6b24f406b31e88577fb67..c9bd42b0dfc07d37bff509723a8a39b01a6e2be0 100644 (file)
@@ -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;