xref: /haiku/src/system/libroot/posix/signal/killpg.cpp (revision 25a7b01d15612846f332751841da3579db313082)
1 /*
2  * Copyright 2007, Vasilis Kaoutsis, kaoutsis@sch.gr.
3  * Distributed under the terms of the MIT License.
4  */
5 
6 
7 #include <errno.h>
8 #include <signal.h>
9 
10 #include <errno_private.h>
11 
12 
13 int
killpg(pid_t processGroupID,int signal)14 killpg(pid_t processGroupID, int signal)
15 {
16 	if (processGroupID > 1)
17 		return kill(-processGroupID, signal);
18 	else {
19 		__set_errno(EINVAL);
20 		return -1;
21 	}
22 }
23