From 57437e21d2695a2e5202d76080caad1b8c645af5 Mon Sep 17 00:00:00 2001 From: David Phillips Date: Wed, 1 Jun 2016 13:45:51 +1200 Subject: Fix race condition in child thread --- fractal-gen.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fractal-gen.c b/fractal-gen.c index 73bd25f..1cc1713 100644 --- a/fractal-gen.c +++ b/fractal-gen.c @@ -152,7 +152,7 @@ main(int argc, char **argv) switch (child = fork()) { case 0: - while((x = s->idx) < s->datasize) { + while(1) { fprintf(stderr, "Thread %d: %.4f%%\r", cores-1, 100.f*(double)x/s->datasize); -- cgit v1.1