mirror of https://git.musl-libc.org/git/musl
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
18 lines
316 B
18 lines
316 B
#include <signal.h>
|
|
#include <errno.h>
|
|
#include "syscall.h"
|
|
|
|
int sigaltstack(const stack_t *ss, stack_t *old)
|
|
{
|
|
if (ss) {
|
|
if (ss->ss_size < MINSIGSTKSZ) {
|
|
errno = ENOMEM;
|
|
return -1;
|
|
}
|
|
if (ss->ss_flags & ~SS_DISABLE) {
|
|
errno = EINVAL;
|
|
return -1;
|
|
}
|
|
}
|
|
return syscall(SYS_sigaltstack, ss, old);
|
|
}
|
|
|