vfs: check userland buffers before reading them.
[haiku.git] / src / system / libroot / posix / signal / sigaltstack.c
blob07d62e36aae6c79c1fe9f4ecb3bccdafc0086d4f
1 /*
2 * Copyright 2007, Axel Dörfler, axeld@pinc-software.de.
3 * Distributed under the terms of the MIT License.
4 */
7 #include <errno.h>
8 #include <signal.h>
10 #include <errno_private.h>
11 #include <syscalls.h>
14 int
15 sigaltstack(const stack_t *alternateStack, stack_t *oldAlternateStack)
17 status_t status =_kern_set_signal_stack(alternateStack, oldAlternateStack);
18 if (status < B_OK) {
19 __set_errno(status);
20 return -1;
23 return 0;