Bug 204273
Summary: | sem_getvalue(3) man page misreports error conditions | ||
---|---|---|---|
Product: | Documentation | Reporter: | gizero |
Component: | man-pages | Assignee: | documentation_man-pages (documentation_man-pages) |
Status: | RESOLVED CODE_FIX | ||
Severity: | normal | CC: | mtk.manpages |
Priority: | P1 | ||
Hardware: | All | ||
OS: | Linux | ||
Kernel Version: | Subsystem: | ||
Regression: | No | Bisected commit-id: |
Description
gizero
2019-07-22 13:16:14 UTC
This is tricky. POSIX allows for EINVAL, and portable applications may care about it. It's true that glibc doesn't check for a valid semaphore, but maybe one day it might. In the source file that you refer to there is this comment: /* XXX Check for valid SEM parameter. */ Admittedly, that comment has been there for a very long time, and nothing so far changed though. I opted to add a sentence: EINVAL sem is not a valid semaphore. (The glibc implementation currently does not check whether sem is valid.) Closing this report now. Ok Michael, it makes sense! Thanks for looking at it. |