HP-UX Reference (11i v1 00/12) - 2 System Calls (vol 5)
__________________________________________________________________________________________________________________________________________________________________________________________________
__________________________________________________________________________________________________________________________________________________________________________________________________
STANDARD Printed by: Nora Chuang [nchuang] STANDARD
/build/1111/BRICK/man2/!!!intro.2
________________________________________________________________
___ ___
s
sigsend(2) sigsend(2)
NAME
sigsend(), sigsendset() - send a signal to a process or a group of processes
SYNOPSIS
#include <sys/signal.h>
#include <sys/procset.h>
int sigsend (idtype_t idtype, id_t id, int sig);
int sigsendset (const procset_t *psp, int sig);
DESCRIPTION
The sigsend() system call sends a signal to a process or a group of processes. The process or group of
processes to which the signal is to be sent is specified by id and idtype. The signal to be sent is specified by
sig and is either one from the list given in signal() (see signal(2)) or 0.
If sig is equal to zero (the null signal), error checking is performed but no signal is actually sent. This can
be used to check the validity of id and idtype.
The real or effective user ID of the sending process must match the real or effective user ID of the receiving
process, unless the process has appropriate privileges, or sig is
SIGCONT and the sending process has the
same session ID as the receiving process.
idtype and id work together as follows:
• If idtype is
P_PID, sig will be sent to the process with a process ID equal to
(pid_t)id.
• If idtype is
P_PGID, sig will be sent to any process with a process group ID equal to
(pid_t)id.
• If idtype is
P_SID, sig will be sent to any process with a session ID equal to
(pid_t)id.
• If idtype is
P_UID, sig will be sent to any process with an effective user ID equal to
(uid_t)id.
• If idtype is
P_GID, sig will be sent to any process with an effective group ID equal to
(gid_t)id.
• If idtype is P_ALL, sig will be sent to all processes and id will be ignored.
• If id is
P_MYID, the value of id is taken from the calling process.
The process with a process ID of 0 is always excluded. The process with a process ID of
1 is included only
if idtype is equal to
P_PID.
sigsendset() provides an alternate interface for sending signals to a set of processes.
psp is a pointer to a structure that includes the following members:
idop p_op;
idtype_t p_lidtype;
id_t p_lid;
idtype_t p_ridtype;
id_t p_rid;
The structure defines a set of processes as the result of a set operation (difference, union, intersection, or
exclusion) on two operands (idtype/id pairs). The left (right) operand is specified by
p_lid (p_rid) and
p_lidtype (p_ridtype) . p_lid (p_rid) takes the values specified by id and p_lidtype
(p_ridtype)
takes the values specified by idtype in the sigsend() system call defined above. p_op
specifies the operand, and takes one of the following values:
POP_DIFF Set difference. The resultant set consists of the processes that are in the left operand
and not in the right operand.
POP_AND Set intersection. The resultant set consists of the processes that are in both the left
and right operands.
POP_OR Set union. The resultant set consists of the processes that are in either the left or
right operand or both.
POP_XOR Set exclusive OR. The resultant set consists of the processes that are in either the left
or right operand but not in both.
HP-UX Release 11i: December 2000 − 1 − Section 2−−359
___
___