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