lkml.org 
[lkml]   [1999]   [Mar]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: sigaltstack doesn't do anything?
From
Date
cmetz@inner.net (Craig Metz) writes:

> I've been working on a program that needs to flip stacks around, and I'm
> finding that sigaltstack() doesn't seem to cause any actual behavioral change
> to happen, at least not with Linux/i386 2.2.0 and glibc 2.1.
>
> Take this test program:
>
[...]

> stack_t ss, oss;
>
> if (!(stack = malloc(8192)))
> exit(1);
>
> memset(&ss, 0, sizeof(stack_t));
> ss.ss_sp = stack;
> ss.ss_size = 8192;
>
> signal(SIGUSR1, sighandler);
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Change it to a sigaction that sets SA_ONSTACK

-Andi

--
This is like TV. I don't like TV.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:50    [from the cache]
©2003-2011 Jasper Spaans