lkml.org 
[lkml]   [1996]   [Jun]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: Ideas for v2.1
Date
> 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


\
 
 \ /
  Last update: 2005-03-22 13:37    [W:0.056 / U:0.084 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site