Re: Ideas for v2.1

Melvin Smith (msmith@quix.robins.af.mil)
Tue, 11 Jun 1996 16:53:47 -0400 (EDT)


> In linux.dev.kernel, Melvin Smith <msmith@quix.robins.af.mil> wrote:
> >> We all get to play while Linus is away. :) Hipsters unite.
> >>
> >> Ideas for 2.1 (subtitled "Things that make you go, hmmmm...") :
> >
> >Add to that sig-stacks and SIGINFO support,
>
> Could anybody enlighten me what a signal stack actually is? I can't
> find any references in my POSIX.4 reference, nor in the HP-UX nor
> AIX manpages.

Most systems have a system call either sigstack (BSD) or sigaltstack
which is SYSV style which allows you to specify an alternate stack
on which to deliver signals (ie. switch to that stack before calling
the sig-handler). You first specify an alt-stack then when using
sigaction() you set sa_flags |= SA_ONSTACK which tells the kernel to
deliver that signal on the alt-stack. I don't really know if POSIX
or X/Open says anything about them.

An example of why this is useful is in the case of a stack-overflow.
Your sig-handler would not work because the kernel would try to
deliver it on the already full stack, boom. I posted my first attempt patch,
but it was not received well, mostly because its really not clean enough yet,
but it DID handle SIGSEGV on stack overflow.

Melvin