NAME |LIBRARY |SYNOPSIS |DESCRIPTION |RETURN VALUE |ERRORS |STANDARDS |HISTORY |NOTES |SEE ALSO |COLOPHON | |
rt_sigqueueinfo(2) System Calls Manualrt_sigqueueinfo(2)rt_sigqueueinfo, rt_tgsigqueueinfo - queue a signal and data
Standard C library (libc,-lc)
#include <linux/signal.h>/* Definition ofSI_*constants */#include <sys/syscall.h>/* Definition ofSYS_*constants */#include <unistd.h>int syscall(SYS_rt_sigqueueinfo, pid_ttgid,intsig, siginfo_t *info);int syscall(SYS_rt_tgsigqueueinfo, pid_ttgid, pid_ttid,intsig, siginfo_t *info);Note: There are no glibc wrappers for these system calls; see NOTES.
Thert_sigqueueinfo() andrt_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 thesigaction(2)SA_SIGINFOflag. These system calls are not intended for direct application use; they are provided to allow the implementation ofsigqueue(3) andpthread_sigqueue(3). Thert_sigqueueinfo() system call sends the signalsig to the thread group with the IDtgid. (The term "thread group" is synonymous with "process", andtgid 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). Theinfo argument specifies the data to accompany the signal. This argument is a pointer to a structure of typesiginfo_t, described insigaction(2) (and defined by including<sigaction.h>). The caller should set the following fields in this structure:si_code This should be one of theSI_*codes in the Linux kernel source fileinclude/asm-generic/siginfo.h. If the signal is being sent to any process other than the caller itself, the following restrictions apply: • The code can't be a value greater than or equal to zero. In particular, it can't beSI_USER, which is used by the kernel to indicate a signal sent bykill(2), and nor can it beSI_KERNEL, which is used to indicate a signal generated by the kernel. • The code can't (since Linux 2.6.39) beSI_TKILL, which is used by the kernel to indicate a signal sent usingtgkill(2).si_pid This should be set to a process ID, typically the process ID of the sender.si_uid This should be set to a user ID, typically the real user ID of the sender.si_value This field contains the user data to accompany the signal. For more information, see the description of the last (union sigval) argument ofsigqueue(3). Internally, the kernel sets thesi_signo field to the value specified insig, so that the receiver of the signal can also obtain the signal number via that field. Thert_tgsigqueueinfo() system call is likert_sigqueueinfo(), but sends the signal and data to the single thread specified by the combination oftgid, a thread group ID, andtid, a thread in that thread group.
On success, these system calls return 0. On error, they return -1 anderrno is set to indicate the error.
EAGAINThe limit of signals which may be queued has been reached. (Seesignal(7) for further information.)EINVALsig,tgid, ortid was invalid.EPERMThe caller does not have permission to send the signal to the target. For the required permissions, seekill(2).EPERMtgid specifies a process other than the caller andinfo->si_code is invalid.ESRCH rt_sigqueueinfo(): No thread group matchingtgid was found.rt_tgsigqueinfo(): No thread matchingtgid andtid was found.
Linux.
rt_sigqueueinfo() Linux 2.2.rt_tgsigqueueinfo() Linux 2.6.31.
Since these system calls are not intended for application use, there are no glibc wrapper functions; usesyscall(2) in the unlikely case that you want to call them directly. As withkill(2), the null signal (0) can be used to check if the specified process or thread exists.
kill(2),pidfd_send_signal(2),sigaction(2),sigprocmask(2),tgkill(2),pthread_sigqueue(3),sigqueue(3),signal(7)
This page is part of theman-pages (Linux kernel and C library user-space interface documentation) project. Information about the project can be found at ⟨https://www.kernel.org/doc/man-pages/⟩. If you have a bug report for this manual page, see ⟨https://git.kernel.org/pub/scm/docs/man-pages/man-pages.git/tree/CONTRIBUTING⟩. This page was obtained from the tarball man-pages-6.15.tar.gz fetched from ⟨https://mirrors.edge.kernel.org/pub/linux/docs/man-pages/⟩ on 2025-08-11. If you discover any rendering problems in this HTML version of the page, or you believe there is a better or more up- to-date source for the page, or you have corrections or improvements to the information in this COLOPHON (which isnot part of the original manual page), send a mail to man-pages@man7.orgLinux man-pages 6.15 2025-05-17rt_sigqueueinfo(2)Pages that refer to this page:pidfd_send_signal(2), syscalls(2), tkill(2), pthread_sigqueue(3), sd_event_add_child(3), sigqueue(3), signal(7), system_data_types(7)
HTML rendering created 2025-09-06 byMichael Kerrisk, author ofThe Linux Programming Interface. For details of in-depthLinux/UNIX system programming training courses that I teach, lookhere. Hosting byjambit GmbH. | ![]() |