Description of problem:
rpmsq.c uses mutexs to manage the child processes. These mutexes are defined
using default parameters. RPM expects that PTHREAD_MUTEX_DEFAULT will have the
effects of PTHREAD_MUTEX_NORMAL. POSIX 1003.1-2004 states that
PTHREAD_MUTEX_DEFAULT may be set to any standard POSIX mutex type, not
necessarily NORMAL. This can lead to many unexpected problems, especially when
porting RPM to new OSes.
Version-Release number of selected component (if applicable):
4.3+
Description of problem: MUTEX_DEFAULT will have the MUTEX_NORMAL. POSIX 1003.1-2004 states that MUTEX_DEFAULT may be set to any standard POSIX mutex type, not
rpmsq.c uses mutexs to manage the child processes. These mutexes are defined
using default parameters. RPM expects that PTHREAD_
effects of PTHREAD_
PTHREAD_
necessarily NORMAL. This can lead to many unexpected problems, especially when
porting RPM to new OSes.
Version-Release number of selected component (if applicable):
4.3+
Additional info:
My suggestion is to add a simple:
#if PTHREAD_ MUTEX_DEFAULT != PTHREAD_ MUTEX_NORMAL MUTEX_DEFAULT == PTHREAD_ MUTEX_NORMAL
#error RPM Expected PTHREAD_
#endif
to the rpmio/rpmsq.c to help prevent future porting issues.. or if the defaults
ever change in an existing port.