critical impact:
sigaction, sigset_t - incompatible data types (CrCh112)
Problem description
The sigaction structure and sigset_t type on Tru64 UNIX are incompatible with the ones on HP-UX. Applications that use them in nonstandard ways might need to make code changes.
The sa_mask field of the sigaction structure is a sigset_t. The standard way to clear a signal set is with sigemptyset. On Tru64 UNIX, some programmers take a shortcut and set it to 0 (zero) directly. That is not portable, and will not compile on HP-UX because HP-UX implements sigset_t differently.
The Tru64 UNIX sigaction structure also has a nonstandard sa_signo field that does not exist on HP-UX. Tru64 UNIX applications do not need to set it because the kernel always overwrites whatever they set it to. Identifiers
 sigaction |
 sigset_t |
|
|
|
Old behavior
struct sigaction sa;
sa.sa_handler = handler;
sa.sa_mask = 0;
sa.sa_flags = 0;
sa.sa_signo = SIGINT; See also
Solution description
Review the applicable manpages and code to determine if you are using these data types in nonstandard ways.
New behavior
struct sigaction sa;
sa.sa_handler = handler;
sigemptyset(&sa.sa_mask);
sa.sa_flags = 0; See also
Problem summary
| classifications |
source types |
OS release |
severity |
type |
| SIG |
C, C++ |
any HP-UX 11i version |
critical |
changed |
|