|RT_SIGQUEUEINFO(2)||Linux Programmer's Manual||RT_SIGQUEUEINFO(2)|
NAMErt_sigqueueinfo, rt_tgsigqueueinfo - queue a signal and data
int rt_sigqueueinfo(pid_t tgid , int sig , siginfo_t * uinfo );
int rt_tgsigqueueinfo(pid_t tgid , pid_t tid , int sig ,
siginfo_t * uinfo );
DESCRIPTIONThe rt_sigqueueinfo() and rt_tgsigqueueinfo() system calls are the low-level interfaces used to send a signal plus data to a process or thread. The receiver of the signal can obtain the accompanying data by establishing a signal handler with the sigaction(2) SA_SIGINFO flag.
- This must be one of the SI_* codes in the Linux kernel source file include/asm-generic/siginfo.h, with the restriction that the code must be negative (i.e., cannot be SI_USER, which is used by the kernel to indicate a signal sent by kill(2)) and cannot (since Linux 2.6.39) be SI_TKILL (which is used by the kernel to indicate a signal sent using tgkill(2)).
- This should be set to a process ID, typically the process ID of the sender.
- This should be set to a user ID, typically the real user ID of the sender.
- This field contains the user data to accompany the signal. For more information, see the description of the last ( union sigval) argument of sigqueue(3).
Internally, the kernel sets the si_signo field to the value specified in sig, so that the receiver of the signal can also obtain the signal number via that field.
The rt_tgsigqueueinfo() system call is like rt_sigqueueinfo(), but sends the signal and data to the single thread specified by the combination of tgid, a thread group ID, and tid, a thread in that thread group.
RETURN VALUEOn success, these system calls return 0. On error, they return -1 and errno is set to indicate the error.
- The limit of signals which may be queued has been reached. (See signal(7) for further information.)
- sig, tgid, or tid was invalid.
- The caller does not have permission to send the signal to the target. For the required permissions, see kill(2). Or: uinfo->si_code is invalid.
rt_sigqueueinfo(): No thread group matching
tgid was found.
VERSIONSThe rt_sigqueueinfo() system call was added to Linux in version 2.2. The rt_tgsigqueueinfo() system call was added to Linux in version 2.6.31.
CONFORMING TOThese system calls are Linux-specific.
NOTESSince these system calls are not intended for application use, there are no glibc wrapper functions; use syscall(2) in the unlikely case that you want to call them directly.
SEE ALSOkill(2), sigaction(2), sigprocmask(2), tgkill(2), pthread_sigqueue(3), sigqueue(3), signal(7)
COLOPHONThis page is part of release 3.53 of the Linux man-pages project. A description of the project, and information about reporting bugs, can be found at http://www.kernel.org/doc/man-pages/.