lkml.org 
[lkml]   [2001]   [Oct]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: SPARC and SA_SIGINFO signal handling
From

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
?
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:12    [W:0.069 / U:0.340 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site