Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 7 Sep 2002 02:45:38 -0700
From:      Juli Mallett <jmallett@FreeBSD.org>
To:        hackers@FreeBSD.org
Subject:   siginfo_t, the signal stack, svr4_sendsig (i386), and the ever unwinding ball of yarn
Message-ID:  <20020907024538.A67757@FreeBSD.org>

next in thread | raw e-mail | index | archive | help
Okay so I've finally wrapped my head around the bit of code that I need,
and I find out that despite FreeBSD having a "native" siginfo_t format,
it's essentially UNUSED!

Here's the deal, I need to be able to write something like trapsignal(),
but generalised, call it siginfosignal(), and pretend that instead of
'code', it takes a 'siginfo_t', and posts the signal, blah blah blah,
but tells the sendsig code to use the supplied siginfo_t, instead of
building one (there seems to be a bug in that, anyway - the first entry
into the signal handler seems to have some extra bits in si_code),
and so on, and would abstract the interface cleanly.  It's easy to
map trapsignal() to just build up an si_code = code, and so on, and
it's easy not to break anything internally, except stuff with intimate
knowledge of the machdep sendsig(), but they could change to the NEW
api anyway.

The problem is I just don't have my head wrapped around the format of
the signal stack, or how to implant/copyout as I need to - it seems
as if NOTHING uses siginfo, except the i386 svr4 compatability code,
and a few other consumers which don't really use it.

Can anyone help me get my head around this so I can modify every one
of the blasted md sendsig() routines, and try to do this as I see "right",
or (please god) point me to a way of doing it with the existing stuff?

I'd love to not make stuff MORE MD than it already is, and I'd further
love to abstract this all nicely, but I'm not sure what I can do, short
of what I outlined above (vaguely).  I know I can get around this in a KSE
world with upcalls and moving everything to the UTS, but right now I'm
doing this in terms of signals as I have to develop on 4.x and OpenBSD,
rather than CURRENT, and I'm seeing that we have a huge gap, with some
tape over it that says "siginfo_t", but it's really just a big gap with
tape over it (excuse the crap metaphors, I'm stretched far too thin).

Thanks,
juli.
-- 
Juli Mallett <jmallett@FreeBSD.org>       | FreeBSD: The Power To Serve
Will break world for fulltime employment. | finger jmallett@FreeBSD.org

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020907024538.A67757>