Bug 113002
Summary: | raise implemented via tkill breaks si_code | ||
---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | Mike Perry <mikepery> |
Component: | man-pages | Assignee: | Eido Inoue <havill> |
Status: | CLOSED RAWHIDE | QA Contact: | Ben Levenson <benl> |
Severity: | medium | Docs Contact: | |
Priority: | medium | ||
Version: | 1 | CC: | drepper, mikepery, roland |
Target Milestone: | --- | ||
Target Release: | --- | ||
Hardware: | i686 | ||
OS: | Linux | ||
Whiteboard: | |||
Fixed In Version: | 1.66-1 | Doc Type: | Bug Fix |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2004-02-19 17:46:05 UTC | Type: | --- |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: |
Description
Mike Perry
2004-01-07 06:24:03 UTC
POSIX says that: "If the implementation supports the Threads option, the effect of the raise() function shall be equivalent to calling: pthread_kill(pthread_self(), sig);" (otherwise kill(getpid(), sig);). SI_USER's reason is written as "Signal sent by kill()." and no si_code is mentioned for pthread_kill. So I don't think POSIX mandates SI_USER in this case, but mandates that it will be the same si_code as with pthread_kill (which uses SI_TKILL as well). I concur. The standard requires that pthread_kill result in an implementation-defined value that is not equal to SI_USER or one of the other specified values. SI_TKILL is our implementation-defined value for pthread_kill. The standard further requires that raise behave as if it were a call to pthread_kill. Ergo, SI_TKILL is the correct implementation-defined value. Using SI_USER here would be in violation of the standard. Well can we get a documentation update for sigaction then? Becuase those docs only mention SI_USER, and state that it is the si_code for raise(), which is very misleading, and can lead developers to produce buggy and non-portable software (which happened to me). With linuxthreads it actually will be SI_USER, but with NPTL SI_TKILL. fixed in 1.66 (look at the man page in both the regular section vs the new POSIX section) |