From: "David S. Miller" <davem@redhat.com>
To: csr21@cam.ac.uk
Cc: linux-kernel@vger.kernel.org
Subject: Re: SPARC and SA_SIGINFO signal handling
Date: Tue, 30 Oct 2001 12:51:34 -0800 (PST) [thread overview]
Message-ID: <20011030.125134.93645850.davem@redhat.com> (raw)
In-Reply-To: <20011029190027.A21372@cam.ac.uk>
In-Reply-To: <20011029190027.A21372@cam.ac.uk>
You're doing something really wrong, it works perfectly
fine here:
? cat test.c
#include <stdlib.h>
#include <sys/ucontext.h>
#include <signal.h>
void sigsegv_handler (int signo, siginfo_t *info, void *data) {
if (info != 0)
exit(1);
exit(0);
}
int main () {
int *foo;
struct sigaction sa;
sa.sa_sigaction = sigsegv_handler;
sa.sa_flags = SA_SIGINFO | SA_RESTART;
sigaction(SIGSEGV, &sa, NULL);
foo = NULL;
*foo = 3;
return 0;
}
? gcc -o test test.c
? ./test
? echo $?
1
? uname -a
Linux pizda.ninka.net 2.4.14-pre4 #1 SMP Mon Oct 29 18:55:18 PST 2001 sparc64 unknown
?
next prev parent reply other threads:[~2001-10-30 20:51 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-10-29 19:00 SPARC and SA_SIGINFO signal handling Christophe Rhodes
2001-10-30 20:51 ` David S. Miller [this message]
2001-10-31 9:43 ` Christophe Rhodes
2001-10-31 10:11 ` David S. Miller
2001-11-03 19:59 ` Richard Henderson
2001-11-03 23:54 ` David S. Miller
2001-11-04 17:25 ` Richard Henderson
2001-11-07 9:33 ` Christophe Rhodes
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20011030.125134.93645850.davem@redhat.com \
--to=davem@redhat.com \
--cc=csr21@cam.ac.uk \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox