killpg - send signal to all members of a process group
SYNOPSIS
#include <signal.h>int killpg(pid_t pgrp, int signal);
DESCRIPTION
The
killpg()
function causes signal
signal
to be sent to all the processes in the process group
pgrp
or to the processes' own process group if
pgrp
is equal to zero.
If
pgrp
is greater than 1, it is equivalent to
kill(-pgrp,signal);
RETURN VALUE
The value returned is -1 on error, or 0 for success.
ERRORS
Errors are returned in
errno
and can be one of the following:
EINVAL
for an invalid signal,
EPERM
if the userid of the calling process is not equal to that of the
process the signal is sent to, and the userid is not that of the
superuser.