xref: /haiku/src/system/libroot/posix/signal/killpg.cpp (revision e6b30aee0fd7a23d6a6baab9f3718945a0cd838a)
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 
11 int
12 killpg(pid_t processGroupID, int signal)
13 {
14 	if (processGroupID > 1)
15 		return kill(-processGroupID, signal);
16 	else {
17 		errno = EINVAL;
18 		return -1;
19 	}
20 }
21