NAME
rtsigqueueinfo, rttgsigqueueinfo - queue a signal and data SYNOPSIS int rtsigqueueinfo(pidt tgid, int sig, siginfot *uinfo); int rttgsigqueueinfo(pidt tgid, pidt tid, int sig, siginfot *uinfo); Note: There are no glibc wrappers for these system calls; see NOTES. DESCRIPTION
The rtsigqueueinfo() and rttgsigqueueinfo() 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) SASIGINFO flag. These system calls are not intended for direct application use; they are provided to allow the implementation of sigqueue(3) and pthreadsigqueue(3). The rtsigqueueinfo() system call sends the signal sig to the thread group with the ID tgid. (The term "thread group" is synonymous with "process", and tid corresponds to the traditional UNIX process ID.) The signal will be delivered to an arbitrary member of the thread group (i.e., one of the threads that is not currently blocking the signal). The uinfo argument specifies the data to accompany the signal. This argument is a pointer to a structure of type siginfot, described in sigaction(2) (and defined by including
). The caller should set the following fields in this structure: sicode 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 SIUSER, which is used by the kernel to indicate a signal sent by kill(2)) and cannot (since Linux 2.6.39) be SITKILL (which is used by the kernel to indicate a signal sent using tgkill(2)). sipid This should be set to a process ID, typically the process ID of the sender. siuid This should be set to a user ID, typically the real user ID of the sender. sivalue 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 sisigno field to the value specified in sig, so that the receiver of the signal can also obtain the signal number via that field. The rttgsigqueueinfo() system call is like rtsigqueueinfo(), but sends the signal and data to the single thread specified by the combi‐ nation of tgid, a thread group ID, and tid, a thread in that thread group. RETURN VALUE
On success, these system calls return 0. On error, they return -1 and errno is set to indicate the error. ERRORS EAGAIN The limit of signals which may be queued has been reached. (See signal(7) for further information.) EINVAL sig, tgid, or tid was invalid. EPERM The caller does not have permission to send the signal to the target. For the required permissions, see kill(2). Or:
uinfo->sicode is invalid. ESRCH rtsigqueueinfo(): No thread group matching tgid was found. rttgsigqueinfo(): No thread matching tgid and tid was found. VERSIONS The rtsigqueueinfo() system call was added to Linux in version 2.2. The rttgsigqueueinfo() system call was added to Linux in version 2.6.31. CONFORMING TO
These system calls are Linux-specific. NOTES Since 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. As with kill(2), the null signal (0) can be used to check if the speci‐ fied process or thread exists. SEE ALSO kill(2), sigaction(2), sigprocmask(2), tgkill(2), pthreadsigqueue(3), sigqueue(3), signal(7) COLOPHON
This 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/.
Linux 2012-07-13 RTSIGQUEUEINFO(2)