xref: /minix3/minix/lib/libc/gen/raise.c (revision 433d6423c39e34ec4b79c950597bb2d236f886be)
1*433d6423SLionel Sambuc /*
2*433d6423SLionel Sambuc  * (c) copyright 1987 by the Vrije Universiteit, Amsterdam, The Netherlands.
3*433d6423SLionel Sambuc  * See the copyright notice in the ACK home directory, in the file "Copyright".
4*433d6423SLionel Sambuc  */
5*433d6423SLionel Sambuc /* $Header$ */
6*433d6423SLionel Sambuc 
7*433d6423SLionel Sambuc #if	defined(_POSIX_SOURCE)
8*433d6423SLionel Sambuc #include	<sys/types.h>
9*433d6423SLionel Sambuc #endif
10*433d6423SLionel Sambuc #include	<signal.h>
11*433d6423SLionel Sambuc 
12*433d6423SLionel Sambuc int _kill(int pid, int sig);
13*433d6423SLionel Sambuc pid_t getpid(void);
14*433d6423SLionel Sambuc 
15*433d6423SLionel Sambuc int
raise(int sig)16*433d6423SLionel Sambuc raise(int sig)
17*433d6423SLionel Sambuc {
18*433d6423SLionel Sambuc 	if (sig < 0 || sig >= _NSIG)
19*433d6423SLionel Sambuc 		return -1;
20*433d6423SLionel Sambuc 	return _kill(getpid(), sig);
21*433d6423SLionel Sambuc }
22