Just return an error for incorrect use rather than almost certainly
creating an inf loop.
Its UB either way, but there is no reason to make the bugs more costly
than they need to be.
Differential D148294
[LIBC] Handle multiple calls to `detach` more gracefully goldstein.w.n on Apr 13 2023, 8:05 PM. Authored by
Details
Just return an error for incorrect use rather than almost certainly Its UB either way, but there is no reason to make the bugs more costly
Diff Detail
Event Timeline
|
A joinable but exiting thread will not cleanup its resources if we remove this. What problem is your patch trying to address?