If you are building with `--with-thread-sanitizer` and don't use the
suppression file, then running configure will report a thread leak.
Call `pthread_join()` to avoid the thread leak.
if (pthread_attr_init(&attr)) return (-1);
if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) return (-1);
if (pthread_create(&id, &attr, foo, NULL)) return (-1);
+ if (pthread_join(id, NULL)) return (-1);
return (0);
}
_ACEOF
if (pthread_attr_init(&attr)) return (-1);
if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) return (-1);
if (pthread_create(&id, &attr, foo, NULL)) return (-1);
+ if (pthread_join(id, NULL)) return (-1);
return (0);
}]])],
[ac_cv_pthread_system_supported=yes],