diff options
author | David Phillips <dbphillipsnz@gmail.com> | 2016-06-01 13:45:51 +1200 |
---|---|---|
committer | David Phillips <dbphillipsnz@gmail.com> | 2016-06-01 13:45:51 +1200 |
commit | 57437e21d2695a2e5202d76080caad1b8c645af5 (patch) | |
tree | 7102e0809ad74a4d6d8937a7319c560a82051bd7 | |
parent | da9941939798abe41caa07830a5605f0d131a2f2 (diff) | |
download | fractal-gen-57437e21d2695a2e5202d76080caad1b8c645af5.tar.xz |
Fix race condition in child thread
-rw-r--r-- | fractal-gen.c | 2 |
1 files changed, 1 insertions, 1 deletions
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); |