From: Christophe Rhodes <csr21@cam.ac.uk>
To: Linux Kernel <linux-kernel@vger.kernel.org>
Subject: SPARC and SA_SIGINFO signal handling
Date: Mon, 29 Oct 2001 19:00:27 +0000 [thread overview]
Message-ID: <20011029190027.A21372@cam.ac.uk> (raw)
Dear all,
I'm having trouble on SPARC/Linux (of both the 32 and 64 varieties)
getting at the third argument of POSIX sa_sigaction signal handlers.
Consider the following code (a simplified version of what I'm actually
trying to do):
--- Cut here ---
#include <stdlib.h>
#include <sys/ucontext.h>
#include <signal.h>
void sigsegv_handler (int signo, siginfo_t *info, void *data) {
return;
}
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;
}
--- Cut here ---
Running under gdb reveals that, whereas on alpha, x86 and ppc the
third argument to sigsegv_handler is a pointer to a ucontext
structure, on sparc and sparc64 I get NULL.
Am I doing something wrong, or is the ucontext argument simply not yet
implemented on the sparc architecture?
Many thanks,
Christophe
--
Jesus College, Cambridge, CB5 8BL +44 1223 510 299
http://www-jcsu.jesus.cam.ac.uk/~csr21/ (defun pling-dollar
(str schar arg) (first (last +))) (make-dispatch-macro-character #\! t)
(set-dispatch-macro-character #\! #\$ #'pling-dollar)
next reply other threads:[~2001-10-29 19:00 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-10-29 19:00 Christophe Rhodes [this message]
2001-10-30 20:51 ` SPARC and SA_SIGINFO signal handling David S. Miller
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=20011029190027.A21372@cam.ac.uk \
--to=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