1*39106Skarels /* 2*39106Skarels * Copyright (c) 1989 The Regents of the University of California. 3*39106Skarels * All rights reserved. 4*39106Skarels * 5*39106Skarels * Redistribution and use in source and binary forms are permitted 6*39106Skarels * provided that the above copyright notice and this paragraph are 7*39106Skarels * duplicated in all such forms and that any documentation, 8*39106Skarels * advertising materials, and other materials related to such 9*39106Skarels * distribution and use acknowledge that the software was developed 10*39106Skarels * by the University of California, Berkeley. The name of the 11*39106Skarels * University may not be used to endorse or promote products derived 12*39106Skarels * from this software without specific prior written permission. 13*39106Skarels * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR 14*39106Skarels * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED 15*39106Skarels * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 16*39106Skarels */ 17*39106Skarels 18*39106Skarels #if defined(LIBC_SCCS) && !defined(lint) 19*39106Skarels static char sccsid[] = "@(#)killpg.c 5.1 (Berkeley) 09/10/89"; 20*39106Skarels #endif /* LIBC_SCCS and not lint */ 21*39106Skarels 22*39106Skarels #include <sys/types.h> 23*39106Skarels #include <sys/errno.h> 24*39106Skarels 25*39106Skarels /* 26*39106Skarels * Backwards-compatible killpg(). 27*39106Skarels */ 28*39106Skarels killpg(pgid, sig) 29*39106Skarels pid_t pgid; 30*39106Skarels int sig; 31*39106Skarels { 32*39106Skarels extern int errno; 33*39106Skarels 34*39106Skarels if (pgid == 1) { 35*39106Skarels errno = ESRCH; 36*39106Skarels return (-1); 37*39106Skarels } 38*39106Skarels return (kill(-pgid, sig)); 39*39106Skarels } 40