The killpg () function sends the signal sig to the process
group pgrp.
killpg(pgrp, sig) is equivalent to kill(-pgrp, sig), when pgrp is greater than 1,
The behavior of killpg ( ) is undefined if pgrp is less than or equal to 1.
killpg returns 0 upon successful completion.
killpg returns -1, upon unsuccessful completion.
errno shall be set to EINVAL, when tThe value of the sig argument is an
invalid or unsupported signal
number.
errno shall be set to EPERM, when the process does not have permission to
send the signal to any
receiving process.
errno shall be set to ESRCH, when no process or process group can be found
corresponding to that specified by pid.