Subject: Re: SIGTRAP for traced processes and COMPAT_MACH
To: Martin Husemann <martin@duskware.de>
From: Christian Limpach <chris@pin.lu>
List: tech-kern
Date: 11/29/2003 15:36:21
From: "Martin Husemann" <martin@duskware.de>
> On Sat, Nov 29, 2003 at 03:08:33PM +0100, Emmanuel Dreyfus wrote:
> > 3) the process destroys the port that catches memory faults exceptions
> > Here, we would restore the signal mask to receive SIGSEGV? This
> > anihiliate what the process requested in step 2, and we are not
> > consistent with Darwin.
>
> Let me try to rephrase how I think it should work:
>
>  - you have two emulation internal vectors, one for sigmask, one for
>    exceptions
>  - from this you calculate an effective sigmask and set it whenever one
>    of those vectors is changed
>  - when you catch a signal, you check the exception vector first and only
>    handle that if it has this signal enabled

Alternatively you could store in the port the signal number which needs to
be masked after the port is destroyed.  If a single port can be the
exception handler for several signals, you could store a mask.  If you can
map from port to signal number, you might only have to set a flag indicating
that the signal has to be masked.

    christian