FreeBSD-7 changed the signal triggered during a write from SIGBUS to SIGSEGV

svn: r7634
This commit is contained in:
Shu-Yu Guo 2007-11-04 04:49:32 +00:00
parent ad99fd0b7b
commit ddb1ef427d

View File

@ -27,13 +27,14 @@ void fault_handler(int sn, struct siginfo *si, void *ctx)
/* As of 2007/06/29, this is a guess for NetBSD! */ /* As of 2007/06/29, this is a guess for NetBSD! */
#if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) #if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__)
# include <signal.h> # include <signal.h>
# include <sys/param.h>
void fault_handler(int sn, siginfo_t *si, void *ctx) void fault_handler(int sn, siginfo_t *si, void *ctx)
{ {
if (!designate_modified(si->si_addr)) if (!designate_modified(si->si_addr))
abort(); abort();
} }
# define NEED_SIGACTION # define NEED_SIGACTION
# if defined(__FreeBSD__) # if defined(__FreeBSD__) && (__FreeBSD_version < 700000)
# define USE_SIGACTON_SIGNAL_KIND SIGBUS # define USE_SIGACTON_SIGNAL_KIND SIGBUS
# else # else
# define USE_SIGACTON_SIGNAL_KIND SIGSEGV # define USE_SIGACTON_SIGNAL_KIND SIGSEGV