SYNOPSISIn sys/types.h In signal.h Ft int Fn killpg pid_t pgrp int sig
DESCRIPTIONThe Fn killpg function sends the signal Fa sig to the process group Fa pgrp . See sigaction(2) for a list of signals. If Fa pgrp is 0, Fn killpg sends the signal to the sending process's process group.
The sending process must be able to Fn kill at least one process in the receiving process group.
RETURN VALUESRv -std killpg
ERRORSThe Fn killpg function will fail and no signal will be sent if:
- Bq Er EINVAL
- The Fa sig argument is not a valid signal number.
- Bq Er ESRCH
- No process can be found in the process group specified by Fa pgrp .
- Bq Er EPERM
- Fn kill returns EPERM for all processes in the process group.
HISTORYThe Fn killpg function appeared in BSD 4.0