https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=234805
Bug ID: 234805
Summary: pthread_*_destroy doesn't handle locked objects
consistently
Product: Base System
Version: CURRENT
Hardware: Any
OS: Any
Status: New
Severity: Affects Only Me
Priority: ---
Component: bin
Assignee: [email protected]
Reporter: [email protected]
The POSIX entry for pthread_cond_destroy() says, "attempting to destroy a
condition variable upon which other threads are currently blocked results in
undefined behavior." Our man page does not say this and instead documents an
error code of EBUSY as meaning "the variable cond is locked by another thread."
However, the code does not attempt to detect this case and simply indicates
success.
OTOH, pthread_mutex_destroy() does check for this case and returns EBUSY.
pthread_rwlock_destroy() has the same behaviour as pthread_cond_destroy(), and
the compat10 sem_destroy() behaves like pthread_mutex_destroy(). We should be
consistent about this.
--
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
[email protected] mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-bugs
To unsubscribe, send any mail to "[email protected]"