1 /* 2 * Copyright (c) 1989 The Regents of the University of California. 3 * All rights reserved. 4 * 5 * %sccs.include.redist.c% 6 */ 7 8 #if defined(LIBC_SCCS) && !defined(lint) 9 static char sccsid[] = "@(#)killpg.c 5.3 (Berkeley) 02/24/91"; 10 #endif /* LIBC_SCCS and not lint */ 11 12 #include <sys/types.h> 13 #include <signal.h> 14 #include <errno.h> 15 16 /* 17 * Backwards-compatible killpg(). 18 */ 19 #if __STDC__ 20 killpg(pid_t pgid, int sig) 21 #else 22 killpg(pgid, sig) 23 pid_t pgid; 24 int sig; 25 #endif 26 { 27 if (pgid == 1) { 28 errno = ESRCH; 29 return (-1); 30 } 31 return (kill(-pgid, sig)); 32 } 33