Summary: | man 3 pthread_getschedparam section ERRORS incomplete | ||||||
---|---|---|---|---|---|---|---|
Product: | Base System | Reporter: | Dan Lukes <dan> | ||||
Component: | standards | Assignee: | freebsd-standards (Nobody) <standards> | ||||
Status: | Closed FIXED | ||||||
Severity: | Affects Only Me | Keywords: | patch | ||||
Priority: | Normal | ||||||
Version: | 6.3-STABLE | ||||||
Hardware: | Any | ||||||
OS: | Any | ||||||
Attachments: |
|
Description
Dan Lukes
2008-07-18 16:30:01 UTC
Note, if the first param is NULL or something that can't be thread ID then the function also return EINVAL. The ESRCH is returned for such ID's that are thread ID, but thread in question doesn't exist Dan Responsible Changed From-To: freebsd-doc->brucec Take. According to POSIX EINVAL isn't a valid return value, which is why it's not documented. It appears that if the parameters are NULL 0 is expected to be returned; in glibc on Linux if both are NULL then 0 is returned otherwise if just one is NULL then a segfault occurs. I'd like to commit the attached patch which I think brings the implementation more in-line with POSIX: return 0 if either parameters are NULL and return ESRCH from functions which search for a pthread_t if a thread doesn't exist regardless of whether it's NULL or otherwise. -- Bruce Cran On 02/22/11 22:41, Bruce Cran:
> According to POSIX EINVAL isn't a valid return value
I don't have problem with proposed patch. I reported the issue because I
got EIVAL and it has not been documented.
Either code or documentation needs to be changed to make them
consistent, but I don't care what part will be corrected.
Thank you for taking those ancient PRs ...
Dan
Responsible Changed From-To: brucec->freebsd-standards commit bit has been taken in for safekeeping. batch change of PRs untouched in 2018 marked "in progress" back to open. Fixed by someone sometime |