diff options
Diffstat (limited to 'man2/sigaction.2')
-rw-r--r-- | man2/sigaction.2 | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/man2/sigaction.2 b/man2/sigaction.2 index 6c241561b..662100c82 100644 --- a/man2/sigaction.2 +++ b/man2/sigaction.2 @@ -1147,12 +1147,12 @@ otherwise. #include <stdio.h> #include <stdlib.h> #include <unistd.h> - +\& void handler(int signo, siginfo_t *info, void *context) { struct sigaction oldact; - +\& if (sigaction(SIGSEGV, NULL, &oldact) == \-1 || (oldact.sa_flags & SA_UNSUPPORTED) || !(oldact.sa_flags & SA_EXPOSE_TAGBITS)) @@ -1161,19 +1161,19 @@ handler(int signo, siginfo_t *info, void *context) } _exit(EXIT_SUCCESS); } - +\& int main(void) { struct sigaction act = { 0 }; - +\& act.sa_flags = SA_SIGINFO | SA_UNSUPPORTED | SA_EXPOSE_TAGBITS; act.sa_sigaction = &handler; if (sigaction(SIGSEGV, &act, NULL) == \-1) { perror("sigaction"); exit(EXIT_FAILURE); } - +\& raise(SIGSEGV); } .EE |