killpg.c 214 字节
Newer Older
R
Rich Felker 已提交
1 2
#include <signal.h>
#include <errno.h>
W
w00349915 已提交
3
#include <unsupported_api.h>
R
Rich Felker 已提交
4 5 6

int killpg(pid_t pgid, int sig)
{
W
w00349915 已提交
7
	unsupported_api(__FUNCTION__);
R
Rich Felker 已提交
8 9 10 11 12 13
	if (pgid < 0) {
		errno = EINVAL;
		return -1;
	}
	return kill(-pgid, sig);
}