killpgid
Killpgid is a term sometimes used to refer to sending a signal to all processes in a particular process group on Unix-like systems. There is no standard POSIX function actually named killpgid. The portable API is killpg, defined in signal.h, which delivers a signal to every member of a process group identified by a process group ID (PGID). Some codebases implement wrappers or use the concept informally; in portable code, developers may also use kill with a negative PID to target a process group.
Process groups are collections of related processes that share a PGID, a mechanism central to job control
The standard function prototype is int killpg(pid_t pgrp, int sig); It sends sig to every process in
Usage considerations include the need for appropriate privileges, the potential for terminating critical or child processes,