fuzz: don't wait for threads with pthread_join
diff --git a/honggfuzz.c b/honggfuzz.c
index a9c32aa..0bffb99 100644
--- a/honggfuzz.c
+++ b/honggfuzz.c
@@ -297,7 +297,6 @@
}
setupSignalsMainThread();
-
setupMainThreadTimer();
for (;;) {
@@ -323,9 +322,13 @@
fuzz_setTerminating();
- /* Ping threads one last time */
- pingThreads(&hfuzz);
- fuzz_threadsStop(&hfuzz);
+ for (;;) {
+ if (ATOMIC_GET(hfuzz.threads.threadsFinished) >= hfuzz.threads.threadsMax) {
+ break;
+ }
+ pingThreads(&hfuzz);
+ usleep(50000); /* 50ms */
+ }
/* Clean-up global buffers */
if (hfuzz.feedback.blacklist) {