1 .\" Copyright (c) 2002, 2011 Michael Kerrisk <mtk.manpages@gmail.com>
3 .\" Permission is granted to make and distribute verbatim copies of this
4 .\" manual provided the copyright notice and this permission notice are
5 .\" preserved on all copies.
7 .\" Permission is granted to copy and distribute modified versions of this
8 .\" manual under the conditions for verbatim copying, provided that the
9 .\" entire resulting derived work is distributed under the terms of a
10 .\" permission notice identical to this one.
12 .\" Since the Linux kernel and libraries are constantly changing, this
13 .\" manual page may be incorrect or out-of-date. The author(s) assume no
14 .\" responsibility for errors or omissions, or for damages resulting from
15 .\" the use of the information contained herein. The author(s) may not
16 .\" have taken the same level of care in the production of this manual,
17 .\" which is licensed free of charge, as they might when working
20 .\" Formatted or processed versions of this manual, if unaccompanied by
21 .\" the source, must acknowledge the copyright and authors of this work.
23 .TH RT_SIGQUEUEINFO 2 2011-09-18 "Linux" "Linux Programmer's Manual"
25 rt_sigqueueinfo, rt_tgsigqueueinfo \- queue a signal and data
28 .BI "int rt_sigqueueinfo(pid_t " tgid ", int " sig ", siginfo_t *" uinfo );
30 .BI "int rt_tgsigqueueinfo(pid_t " tgid ", pid_t " tid ", int " sig ,
31 .BI " siginfo_t *" uinfo );
35 .BR rt_sigqueueinfo ()
37 .BR rt_tgsigqueueinfo ()
38 system calls are the low-level interfaces used to send a signal plus data
39 to a process or thread.
40 The receiver of the signal can obtain the accompanying data
41 by establishing a signal handler with the
46 These system calls are not intended for direct application use;
47 they are provided to allow the implementation of
50 .BR pthread_sigqueue (3).
53 .BR rt_sigqueueinfo ()
54 system call sends the signal
56 to the thread group with the ID
58 (The term "thread group" is synonomous with "process", and
60 corresponds to the traditional UNIX process ID.)
61 The signal will be delivered to an arbitrary member of the thread group
62 (i.e., one of the threads that is not currently blocking the signal).
66 argument specifies the data to accompany the signal.
67 This argument is a pointer to a structure of type
71 (and defined by including
73 The caller should set the following fields in this structure:
76 This must be one of the
78 codes in the kernel source file
79 .IR include/asm-generic/siginfo.h ,
80 with the restriction that the code must be negative
83 which is used by the kernel to indicate a signal sent by
85 and cannot (since Linux 2.6.39) be
87 (which is used by the kernel to indicate a signal sent using
92 This should be set to a process ID,
93 typically the process ID of the sender.
96 This should be set to a user ID,
97 typically the real user ID of the sender.
100 This field contains the user data to accompany the signal.
101 For more information, see the description of the last
102 .RI ( "union sigval" )
106 Internally, the kernel sets the
108 field to the value specified in
110 so that the receiver of the signal can also obtain
111 the signal number via that field.
114 .BR rt_tgsigueueinfo ()
116 .BR rt_sigueueinfo (),
117 but sends the signal and data to the single thread
118 specified by the combination of
123 a thread in that thread group.
125 On success, these system calls return 0.
126 On error, they return \-1 and
128 is set to indicate the error.
132 The limit of signals which may be queued has been reached.
135 for further information.)
145 The caller does not have permission to send the signal to the target.
146 For the required permissions, see
153 .BR rt_sigqueinfo ():
154 No thread group matching
158 .BR rt_rtsigqueinfo ():
166 .BR rt_sigqueueinfo ()
167 system call was added to Linux in version 2.2.
169 .BR rt_tgsigqueueinfo ()
170 system call was added to Linux in version 2.6.31.
172 These system calls are Linux-specific.
174 Since these system calls are not intended for application use,
175 there are no glibc wrapper functions; use
177 in the unlikely case that you want to call them directly.
181 the null signal (0) can be used to check if the specified process
188 .BR pthread_sigqueue (3),