Red Hat Bugzilla – Bug 126680
sem_wait man page has bug in RETURN VALUE section
Last modified: 2007-11-30 17:07:02 EST
The sem_wait(3) man page states that sem_wait and sem_trywait
always return 0. That's not correct. The Opengroup man pages
allow -1 as return value with errno set. This can happen on
RHEL 3 as well, e. g. when running an application under GDB
and pthread_create is called while another thread is waiting
in a sem_wait call. In that case, sem_wait returns -1 and
errno set to EINTR.
man page part of glibc-devel.
fyi, the posix version (man 3p), which is part of man-pages, has the
correct return value.
The LinuxThreads implementation always returns 0 and this is what the
man page documents.
The NPTL implementation is different. Just another reason why the man
page should move to man-pages, it must be independent.
Adrian, do you want to copy the pages, edit and distribute them? This
need to be coordinated with Jakub stopping to distribute them.
Ugh, Andrian wasn't cc:ed. See comment #2.
comment 2: sure, i'll put them in.
however, we'll need non-english versions as well to go in all the man
Reassigning to man-pages.
The files are in the glibc sources or, if you prefer, packaged in
~drepper/thread-man-pages.tar.bz2 on devserv.
If you need help with making the changes requested in this bug, please
let me. Also let Jakub know which man-pages RPM will contain the new
pages so that the glibc RPM stops distributing them.
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on the solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.