On Sat, Apr 6, 2024 at 10:46 AM jean-frederic clere <jfcl...@gmail.com> wrote:
>
> It seems pthread_kill(t, 0) returns 0 even the thread t has exited...
> older version of fedora will return 3 (I have tried fc28)
>
> The small example (taken from the internet) seems to behave like httpd
> reporting running threads that have exited...
>
> I have created https://bugzilla.redhat.com/show_bug.cgi?id=2273757 in
> case it is a fedora/rhel bug.

FWIW I find the new pthread_kill() behaviour completely useless. ESRCH
was for threads that exited already but were not joined (i.e.
"inactive" per POSIX), but for threads that are joined/detached (i.e.
"dead" or "end of lifetime") as documented by POSIX it's completely
useless because any pthread_ function usage is already undefined
behaviour on those (IOW, no one should do this).
So glibc conforming to POSIX here by removing ESRCH is just pointless,
they just killed pthread_kill(, 0) for no/bad reasons..

Reply via email to