Re: SIGBUS -> SIGSEGV

Ingo Weinhold <[email protected]> Sun, 31 Aug 2008 02:51:10 +0200
Newsgroups gmane.os.openbeos.kernel.devel
Message-ID <[email protected]>
On 2008-08-31 at 01:22:56 [+0200], Salvatore Benedetto <[email protected]> 
wrote:
> 2008/8/31 Ingo Weinhold <[email protected]>:
> >
> > On 2008-08-30 at 15:58:43 [+0200], Salvatore Benedetto <[email protected]>
> > wrote:
> >>
> >> while trying to compile tcl within Haiku, the build process
> >> failed in a switch case on SIGBUS saying that it was already
> >> defined a few lines above, where actually the case SIGSEGV
> >> was. So I looked up in the Haiku code and found the following
> >>
> >> #define SIGBUS      SIGSEGV /* for old style code */
> >>
> >> What does exactly old style code means? Is this still needed?
> >
> > SIGBUS is defined by POSIX, so we'll have to keep it. I'm afraid you'll 
> > have
> > to "#ifndef __HAIKU__" the SIGBUS case.
> 
> Fine by me. Just wanted to understand why it is defined like SIGSEGV, is 
> that
> something to do with BeOS compatibility?

That's at least how BeOS defines it. We could theoretically define a fresh 
value for it, but that would also change NSIG and might lead to compatibility 
problems. I don't think we send SIGBUS anywhere, though.

CU, Ingo

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/