1 .\" Copyright (c) 2002, 2011 Michael Kerrisk <mtk.manpages@gmail.com>
3 .\" %%%LICENSE_START(VERBATIM)
4 .\" Permission is granted to make and distribute verbatim copies of this
5 .\" manual provided the copyright notice and this permission notice are
6 .\" preserved on all copies.
8 .\" Permission is granted to copy and distribute modified versions of this
9 .\" manual under the conditions for verbatim copying, provided that the
10 .\" entire resulting derived work is distributed under the terms of a
11 .\" permission notice identical to this one.
13 .\" Since the Linux kernel and libraries are constantly changing, this
14 .\" manual page may be incorrect or out-of-date. The author(s) assume no
15 .\" responsibility for errors or omissions, or for damages resulting from
16 .\" the use of the information contained herein. The author(s) may not
17 .\" have taken the same level of care in the production of this manual,
18 .\" which is licensed free of charge, as they might when working
21 .\" Formatted or processed versions of this manual, if unaccompanied by
22 .\" the source, must acknowledge the copyright and authors of this work.
25 .TH RT_SIGQUEUEINFO 2 2021-03-22 "Linux" "Linux Programmer's Manual"
27 rt_sigqueueinfo, rt_tgsigqueueinfo \- queue a signal and data
30 .BI "int rt_sigqueueinfo(pid_t " tgid ", int " sig ", siginfo_t *" info );
31 .BI "int rt_tgsigqueueinfo(pid_t " tgid ", pid_t " tid ", int " sig \
32 ", siginfo_t *" info );
36 There are no glibc wrappers for these system calls; see NOTES.
39 .BR rt_sigqueueinfo ()
41 .BR rt_tgsigqueueinfo ()
42 system calls are the low-level interfaces used to send a signal plus data
43 to a process or thread.
44 The receiver of the signal can obtain the accompanying data
45 by establishing a signal handler with the
50 These system calls are not intended for direct application use;
51 they are provided to allow the implementation of
54 .BR pthread_sigqueue (3).
57 .BR rt_sigqueueinfo ()
58 system call sends the signal
60 to the thread group with the ID
62 (The term "thread group" is synonymous with "process", and
64 corresponds to the traditional UNIX process ID.)
65 The signal will be delivered to an arbitrary member of the thread group
66 (i.e., one of the threads that is not currently blocking the signal).
70 argument specifies the data to accompany the signal.
71 This argument is a pointer to a structure of type
75 (and defined by including
77 The caller should set the following fields in this structure:
80 This should be one of the
82 codes in the Linux kernel source file
83 .IR include/asm\-generic/siginfo.h .
84 If the signal is being sent to any process other than the caller itself,
85 the following restrictions apply:
88 The code can't be a value greater than or equal to zero.
89 In particular, it can't be
91 which is used by the kernel to indicate a signal sent by
95 which is used to indicate a signal generated by the kernel.
97 The code can't (since Linux 2.6.39) be
99 which is used by the kernel to indicate a signal sent using
105 This should be set to a process ID,
106 typically the process ID of the sender.
109 This should be set to a user ID,
110 typically the real user ID of the sender.
113 This field contains the user data to accompany the signal.
114 For more information, see the description of the last
115 .RI ( "union sigval" )
119 Internally, the kernel sets the
121 field to the value specified in
123 so that the receiver of the signal can also obtain
124 the signal number via that field.
127 .BR rt_tgsigqueueinfo ()
129 .BR rt_sigqueueinfo (),
130 but sends the signal and data to the single thread
131 specified by the combination of
136 a thread in that thread group.
138 On success, these system calls return 0.
139 On error, they return \-1 and
141 is set to indicate the error.
145 The limit of signals which may be queued has been reached.
148 for further information.)
158 The caller does not have permission to send the signal to the target.
159 For the required permissions, see
164 specifies a process other than the caller and
169 .BR rt_sigqueueinfo ():
170 No thread group matching
174 .BR rt_tgsigqueinfo ():
182 .BR rt_sigqueueinfo ()
183 system call was added to Linux in version 2.2.
185 .BR rt_tgsigqueueinfo ()
186 system call was added to Linux in version 2.6.31.
188 These system calls are Linux-specific.
190 Since these system calls are not intended for application use,
191 there are no glibc wrapper functions; use
193 in the unlikely case that you want to call them directly.
197 the null signal (0) can be used to check if the specified process
201 .BR pidfd_send_signal (2),
205 .BR pthread_sigqueue (3),