LIBRARY
Lb libcSYNOPSIS
In sys/types.h In signal.h Ft int Fn killpg pid_t pgrp int sigDESCRIPTION
The 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 VALUES
Rv -std killpgERRORS
The 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.
HISTORY
The Fn killpg function appeared in BSD 4.0