killpg(2) DG/UX 5.4.2 killpg(2)
NAME
killpg - send signal to a process or a process group
SYNOPSIS
int killpg (pgrp, signalnumber)
int pgrp;
int signalnumber;
where:
pgrp Process-group-id of the processes being sent the
signal
signalnumber Type of signal being sent
DESCRIPTION
Killpg sends the signal signalnumber to all processes in the process
group identified by pgrp.
The sending process must have permission to send a signal to the
process group members. The signal is sent to all those processes for
which the caller has permission.
The process group identified by pgrp falls into one of four
categories depending on the value of pgrp:
pgrp > 0 Signal all processes in a specified process group.
Signalnumber will be sent to all processes in the
process group whose process-group-id is equal to pgrp.
System processes are never selected.
pgrp = 0 Signal all processes in the sender's process group.
Signalnumber will be sent to all processes, excluding
system processes, whose process-group-id is equal to the
process-group-id of the sender. It is an error for the
process-group-id of the sender to be zero.
pgrp = -1 Signal all processes.
If the effective-user-id of the sender is super-user,
signalnumber is sent to all processes excluding system
processes. Otherwise, signalnumber is sent to all
processes, excluding system processes, whose process-
group-id is -1 (i.e., no processes will be sent
signalnumber).
pgrp < -1 Signal all processes in a specified process group.
Signalnumber will be sent to all processes, excluding
system processes, whose process-group-id is equal to
pgrp. [This selects no processes.]
Licensed material--property of copyright holder(s) 1
killpg(2) DG/UX 5.4.2 killpg(2)
ACCESS CONTROL
Permission to send a signal is granted in three ways:
⊕ The sending and receiving processes have the same effective-
user-id.
⊕ The sending process is the super-user.
⊕ The sending process is an ancestor of the receiving process
and the signal being sent is SIGCONT.
RETURN VALUE
0 Completed successfully.
-1 An error occurred. errno is set to indicate the error.
DIAGNOSTICS
Errno may be set to one of the following error codes:
EINVAL Signalnumber is not a valid signal number.
EINVAL pgrp is zero and the caller's process-group-id is zero.
ESRCH No process can be found in the process group identified by
pgrp.
EPERM The sending process does not have permission to signal all
members of the specified process group. This error code is
not set by the Berkeley implementations.
SEE ALSO
csh(1), kill(1), kill(2), signal(2), jobs(3C).
Licensed material--property of copyright holder(s) 2