xref: /haiku/src/system/libroot/posix/signal/killpg.cpp (revision fce4895d1884da5ae6fb299d23c735c598e690b1)
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
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