1 .\" Copyright (c) 2002, 2011 Michael Kerrisk <mtk.manpages@gmail.com>
3 .\" SPDX-License-Identifier: Linux-man-pages-copyleft
5 .TH RT_SIGQUEUEINFO 2 2021-03-22 "Linux man-pages (unreleased)"
7 rt_sigqueueinfo, rt_tgsigqueueinfo \- queue a signal and data
10 .RI ( libc ", " \-lc )
13 .BR "#include <linux/signal.h>" " /* Definition of " SI_* " constants */"
14 .BR "#include <sys/syscall.h>" " /* Definition of " SYS_* " constants */"
15 .B #include <unistd.h>
17 .BI "int syscall(SYS_rt_sigqueueinfo, pid_t " tgid ,
18 .BI " int " sig ", siginfo_t *" info );
19 .BI "int syscall(SYS_rt_tgsigqueueinfo, pid_t " tgid ", pid_t " tid ,
20 .BI " int " sig ", siginfo_t *" info );
24 There are no glibc wrappers for these system calls; see NOTES.
27 .BR rt_sigqueueinfo ()
29 .BR rt_tgsigqueueinfo ()
30 system calls are the low-level interfaces used to send a signal plus data
31 to a process or thread.
32 The receiver of the signal can obtain the accompanying data
33 by establishing a signal handler with the
38 These system calls are not intended for direct application use;
39 they are provided to allow the implementation of
42 .BR pthread_sigqueue (3).
45 .BR rt_sigqueueinfo ()
46 system call sends the signal
48 to the thread group with the ID
50 (The term "thread group" is synonymous with "process", and
52 corresponds to the traditional UNIX process ID.)
53 The signal will be delivered to an arbitrary member of the thread group
54 (i.e., one of the threads that is not currently blocking the signal).
58 argument specifies the data to accompany the signal.
59 This argument is a pointer to a structure of type
63 (and defined by including
65 The caller should set the following fields in this structure:
68 This should be one of the
70 codes in the Linux kernel source file
71 .IR include/asm\-generic/siginfo.h .
72 If the signal is being sent to any process other than the caller itself,
73 the following restrictions apply:
76 The code can't be a value greater than or equal to zero.
77 In particular, it can't be
79 which is used by the kernel to indicate a signal sent by
83 which is used to indicate a signal generated by the kernel.
85 The code can't (since Linux 2.6.39) be
87 which is used by the kernel to indicate a signal sent using
93 This should be set to a process ID,
94 typically the process ID of the sender.
97 This should be set to a user ID,
98 typically the real user ID of the sender.
101 This field contains the user data to accompany the signal.
102 For more information, see the description of the last
103 .RI ( "union sigval" )
107 Internally, the kernel sets the
109 field to the value specified in
111 so that the receiver of the signal can also obtain
112 the signal number via that field.
115 .BR rt_tgsigqueueinfo ()
117 .BR rt_sigqueueinfo (),
118 but sends the signal and data to the single thread
119 specified by the combination of
124 a thread in that thread group.
126 On success, these system calls return 0.
127 On error, they return \-1 and
129 is set to indicate the error.
133 The limit of signals which may be queued has been reached.
136 for further information.)
146 The caller does not have permission to send the signal to the target.
147 For the required permissions, see
152 specifies a process other than the caller and
157 .BR rt_sigqueueinfo ():
158 No thread group matching
162 .BR rt_tgsigqueinfo ():
170 .BR rt_sigqueueinfo ()
171 system call was added to Linux in version 2.2.
173 .BR rt_tgsigqueueinfo ()
174 system call was added to Linux in version 2.6.31.
176 These system calls are Linux-specific.
178 Since these system calls are not intended for application use,
179 there are no glibc wrapper functions; use
181 in the unlikely case that you want to call them directly.
185 the null signal (0) can be used to check if the specified process
189 .BR pidfd_send_signal (2),
193 .BR pthread_sigqueue (3),