killpg(2) send signal to a process group

LIBRARY

Lb libc

SYNOPSIS

In sys/types.h In signal.h Ft int Fn killpg pid_t pgrp int sig

DESCRIPTION

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 killpg

ERRORS

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