[Bug 1731] pthread_join() returns ESRCH if target thread already terminated
bugzilla-daemon at rtems.org
bugzilla-daemon at rtems.org
Thu May 26 03:04:52 UTC 2011
https://www.rtems.org/bugzilla/show_bug.cgi?id=1731
--- Comment #4 from Gregory Taylor <gtaylor at jpl.nasa.gov> 2011-05-25 22:04:51 CDT ---
(In reply to comment #3)
> The idea of holding state information for a thread pasts its life does not
> sound correct. It was also not clear to me how the zombie data was to be
> avoided.
From
http://pubs.opengroup.org/onlinepubs/9699919799/functions/pthread_join.html
"The pthread_join() or pthread_detach() function should eventually be called
for every thread that is created with the detachstate attribute set to
PTHREAD_CREATE_JOINABLE so that storage associated with the thread may be
reclaimed."
But it also goes on to say:
"If an implementation detects use of a thread ID after the end of its lifetime,
it is recommended that the function should fail and report an [ESRCH] error."
Seems a little conflicting to me... But based on the second statement, perhaps
the current implementation is correct.
--
Configure bugmail: https://www.rtems.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are watching all bug changes.
More information about the bugs
mailing list