BSD 4_4 development
[unix-history] / usr / share / man / cat2 / killpg.0
KILLPG(2) BSD Programmer's Manual KILLPG(2)
N\bNA\bAM\bME\bE
k\bki\bil\bll\blp\bpg\bg - send signal to a process group
S\bSY\bYN\bNO\bOP\bPS\bSI\bIS\bS
#\b#i\bin\bnc\bcl\blu\bud\bde\be <\b<s\bsi\big\bgn\bna\bal\bl.\b.h\bh>\b>
_\bi_\bn_\bt
k\bki\bil\bll\blp\bpg\bg(_\bp_\bi_\bd_\b__\bt _\bp_\bg_\br_\bp, _\bi_\bn_\bt _\bs_\bi_\bg);
D\bDE\bES\bSC\bCR\bRI\bIP\bPT\bTI\bIO\bON\bN
K\bKi\bil\bll\blp\bpg\bg() sends the signal _\bs_\bi_\bg to the process group _\bp_\bg_\br_\bp. See sigaction(2)
for a list of signals. If _\bp_\bg_\br_\bp is 0, k\bki\bil\bll\blp\bpg\bg() sends the signal to the
sending process's process group.
The sending process and members of the process group must have the same
effective user ID, or the sender must be the super-user. As a single
special case the continue signal SIGCONT may be sent to any process that
is a descendant of the current process.
R\bRE\bET\bTU\bUR\bRN\bN V\bVA\bAL\bLU\bUE\bES\bS
Upon successful completion, a value of 0 is returned. Otherwise, a value
of -1 is returned and the global variable _\be_\br_\br_\bn_\bo is set to indicate the
error.
E\bER\bRR\bRO\bOR\bRS\bS
K\bKi\bil\bll\blp\bpg\bg() will fail and no signal will be sent if:
[EINVAL] _\bS_\bi_\bg is not a valid signal number.
[ESRCH] No process can be found in the process group specified by
_\bp_\bg_\br_\bp.
[ESRCH] The process group was given as 0 but the sending process
does not have a process group.
[EPERM] The sending process is not the super-user and one or more
of the target processes has an effective user ID different
from that of the sending process.
S\bSE\bEE\bE A\bAL\bLS\bSO\bO
kill(2), getpgrp(2), sigaction(2)
H\bHI\bIS\bST\bTO\bOR\bRY\bY
The k\bki\bil\bll\blp\bpg\bg function call appeared in 4.0BSD.
4th Berkeley Distribution June 2, 1993 1