Subject: Re: psignal() and COMPAT_MACH exceptions
To: Christos Zoulas <>
From: Emmanuel Dreyfus <>
List: tech-kern
Date: 12/01/2003 14:50:14
Christos Zoulas <> wrote:

> | And a last minute good news: If I register EXC_BAD_ACCESS and try to
> | kill(getpid(), SIGSEGV), I don't get a Mach exception, I get a signal.
> Even when SIGSEGV is blocked?

No, I have the standard UNIX signals semantics: if the signal is
blocked, I don't get it.

Signals coming from traps have to be turned into Mach exceptions (if
there is a registered non-dead exception port for this exception),
regardless of the signal mask, but signals generated from elsewhere must
trigger UNIX signals. This includes SIGPIPE, SIGABRT, SIGIO...

At least this is how it should be for MacOS X.2.
> | 2) softsignals will be handled in darwin_sendsig. This solves the
> | special case of SIGTRAP in sys_execve without the need for modifying MI
> | code.
> That sounds fine with me for now.

Except that I discovered in the meantime that this could not be done so
easily, as only catched signals reach darwin_sendsig. See another mail I
sent about it: I still need an emulation hook at the beginning of

Emmanuel Dreyfus
Il y a 10 sortes de personnes dans le monde: ceux qui comprennent 
le binaire et ceux qui ne le comprennent pas.