Subject: Re: SIGTRAP for traced processes and COMPAT_MACH
To: Emmanuel Dreyfus <manu@NetBSD.org>
From: Matthew Orgass <darkstar@city-net.com>
List: tech-kern
Date: 11/30/2003 20:37:04
On 2003-11-30 manu@NetBSD.org wrote:
> Matthew Orgass <darkstar@city-net.com> wrote:
> > > If we interecept the signal in kpsignal2, we need to intercept it in
> > > trapsignal too.
> >   No, I mean why not use the existing e_trapsignal for this?
>
> For consitency sake?

  The way e_trapsignal is currently done is consistent with the rest of
the compat code.  I think it should be done the way you suggest for
kpsignal2 because it is static, but trapsignal isn't so I don't seen any
reason to change it.

> >   Apple has a kqueue manpage, so it looks like they either use it already
> > or intend to do so in the future.  If it is there already it is worth a
> > quick check to make sure the emulation is right.
>
> Well, let's keep this problem for later, as it does not seems to be
> related to the one we have now. Is it related?

  Just where exactly to put the e_checksignal call (which can be easily
changed later).  It might be easier to check it now than debug it later.
Of course, if it isn't used currently it isn't guaranteed that Apple has
thought about it either (the kqueue man page seems to be a direct copy
from FreeBSD and doesn't mention interaction with Mach events at all).
Still, might be best to start with current practice if easy to discern to
minimize the chance of surprise when it is used (hopefully they don't do
something strange with kqueue too).

  Thanks for working on this!  It would be very nice to some day be able
to run commercial mac apps under NetBSD.

Matthew Orgass
darkstar@city-net.com