United States-English |
|
|
HP-UX Reference > Ssigsend(2)HP-UX 11i Version 3: February 2007 |
|
NAMEsigsend(), 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); DESCRIPTIONThe 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:
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:
RETURN VALUEUpon successful completion, sigsend() returns a value of 0. Otherwise, it returns a value of -1 and sets errno to indicate the error. ERRORSIf sigsend() fails, it sets errno (see errno(2)) to one of the following values:
|
Printable version | ||
|