actually set up the 2nd stack (8k - much mroe than we need)

SVN revision: 15570
This commit is contained in:
Carsten Haitzler 2005-06-29 15:29:53 +00:00
parent 2c6da15f6e
commit 0582c92943
1 changed files with 12 additions and 1 deletions

View File

@ -65,10 +65,21 @@ main(int argc, char **argv)
char buf[1024];
char *s;
struct sigaction action;
/* trap deadly bug signals and allow some form of sane recovery */
/* or ability to gdb attach and debug at this point - better than your */
/* wm/desktop vanishing and not knowing what happened */
#if 1
{
stack_t ss;
ss.ss_sp = malloc(8 * 1024);
ss.ss_size = 8 * 1024;
ss.ss_flags = 0;
sigaltstack(&ss, NULL);
}
#endif
action.sa_sigaction = e_sigseg_act;
action.sa_flags = SA_ONSTACK | SA_NODEFER | SA_RESETHAND | SA_SIGINFO;
sigemptyset(&action.sa_mask);