Created
March 13, 2010 21:05
-
-
Save methodmissing/331549 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
static void | |
create_sigstack() | |
{ | |
stack_t ss; | |
ss.ss_size = SIGSTKSZ; | |
ss.ss_sp = malloc(ss.ss_size); | |
ss.ss_flags = 0; | |
if (sigaltstack(&ss, NULL) < 0) { | |
free(ss.ss_sp); | |
fprintf(stderr, "Couldn't create signal stack! Error %d: %s\n", errno, strerror(errno)); | |
exit(1); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment