vfs: check userland buffers before reading them.
[haiku.git] / src / libs / bsd / signal.c
blob2e58618bb9229ec1ae4129da5a41d8caa0e13519
1 /*
2 * Copyright 2006, Haiku, Inc. All Rights Reserved.
3 * Distributed under the terms of the MIT License.
5 * Authors:
6 * Axel Dörfler, axeld@pinc-software.de
7 */
10 #include <signal.h>
13 int
14 sigsetmask(int mask)
16 sigset_t set = mask;
17 sigset_t oset;
19 if (sigprocmask(SIG_SETMASK, &set, &oset) < 0)
20 return -1;
22 return (int)oset;
26 int
27 sigblock(int mask)
29 sigset_t set = mask;
30 sigset_t oset;
32 if (sigprocmask(SIG_BLOCK, &set, &oset) < 0)
33 return -1;
35 return (int)oset;