1RT_SIGQUEUEINFO(2)         Linux Programmer's Manual        RT_SIGQUEUEINFO(2)
2
3
4

NAME

6       rt_sigqueueinfo, rt_tgsigqueueinfo - queue a signal and data
7

SYNOPSIS

9       #include <linux/signal.h>     /* Definition of SI_* constants */
10       #include <sys/syscall.h>      /* Definition of SYS_* constants */
11       #include <unistd.h>
12
13       int syscall(SYS_rt_sigqueueinfo, pid_t tgid,
14                   int sig, siginfo_t *info);
15       int syscall(SYS_rt_tgsigqueueinfo, pid_t tgid, pid_t tid,
16                   int sig, siginfo_t *info);
17
18       Note: There are no glibc wrappers for these system calls; see NOTES.
19

DESCRIPTION

21       The rt_sigqueueinfo() and rt_tgsigqueueinfo() system calls are the low-
22       level interfaces used to send a  signal  plus  data  to  a  process  or
23       thread.  The receiver of the signal can obtain the accompanying data by
24       establishing a signal handler with the sigaction(2) SA_SIGINFO flag.
25
26       These system calls are not intended for direct  application  use;  they
27       are   provided   to   allow   the  implementation  of  sigqueue(3)  and
28       pthread_sigqueue(3).
29
30       The rt_sigqueueinfo() system call sends the signal sig  to  the  thread
31       group  with  the  ID tgid.  (The term "thread group" is synonymous with
32       "process", and tid corresponds to the  traditional  UNIX  process  ID.)
33       The signal will be delivered to an arbitrary member of the thread group
34       (i.e., one of the threads that is not currently blocking the signal).
35
36       The info argument specifies the data to accompany the signal.  This ar‐
37       gument  is  a  pointer  to  a structure of type siginfo_t, described in
38       sigaction(2) (and defined  by  including  <sigaction.h>).   The  caller
39       should set the following fields in this structure:
40
41       si_code
42              This  should be one of the SI_* codes in the Linux kernel source
43              file include/asm-generic/siginfo.h.  If the signal is being sent
44              to  any  process other than the caller itself, the following re‐
45              strictions apply:
46
47              *  The code can't be a value greater than or equal to zero.   In
48                 particular,  it can't be SI_USER, which is used by the kernel
49                 to indicate a signal sent by  kill(2),  and  nor  can  it  be
50                 SI_KERNEL,  which  is  used to indicate a signal generated by
51                 the kernel.
52
53              *  The code can't (since Linux 2.6.39)  be  SI_TKILL,  which  is
54                 used by the kernel to indicate a signal sent using tgkill(2).
55
56       si_pid This  should be set to a process ID, typically the process ID of
57              the sender.
58
59       si_uid This should be set to a user ID, typically the real user  ID  of
60              the sender.
61
62       si_value
63              This  field contains the user data to accompany the signal.  For
64              more information, see the description of the last (union sigval)
65              argument of sigqueue(3).
66
67       Internally,  the  kernel sets the si_signo field to the value specified
68       in sig, so that the receiver of the signal can also obtain  the  signal
69       number via that field.
70
71       The  rt_tgsigqueueinfo()  system  call  is  like rt_sigqueueinfo(), but
72       sends the signal and data to the single thread specified by the  combi‐
73       nation  of  tgid,  a  thread group ID, and tid, a thread in that thread
74       group.
75

RETURN VALUE

77       On success, these system calls return 0.  On error, they return -1  and
78       errno is set to indicate the error.
79

ERRORS

81       EAGAIN The limit of signals which may be queued has been reached.  (See
82              signal(7) for further information.)
83
84       EINVAL sig, tgid, or tid was invalid.
85
86       EPERM  The caller does not have permission to send the  signal  to  the
87              target.  For the required permissions, see kill(2).
88
89       EPERM  tgid specifies a process other than the caller and info->si_code
90              is invalid.
91
92       ESRCH  rt_sigqueueinfo(): No thread group matching tgid was found.
93
94       rt_tgsigqueinfo(): No thread matching tgid and tid was found.
95

VERSIONS

97       The rt_sigqueueinfo() system call was added to Linux  in  version  2.2.
98       The  rt_tgsigqueueinfo()  system  call  was  added  to Linux in version
99       2.6.31.
100

CONFORMING TO

102       These system calls are Linux-specific.
103

NOTES

105       Since these system calls are not intended for  application  use,  there
106       are  no  glibc  wrapper  functions; use syscall(2) in the unlikely case
107       that you want to call them directly.
108
109       As with kill(2), the null signal (0) can be used to check if the speci‐
110       fied process or thread exists.
111

SEE ALSO

113       kill(2), pidfd_send_signal(2), sigaction(2), sigprocmask(2), tgkill(2),
114       pthread_sigqueue(3), sigqueue(3), signal(7)
115

COLOPHON

117       This page is part of release 5.13 of the Linux  man-pages  project.   A
118       description  of  the project, information about reporting bugs, and the
119       latest    version    of    this    page,    can     be     found     at
120       https://www.kernel.org/doc/man-pages/.
121
122
123
124Linux                             2021-03-22                RT_SIGQUEUEINFO(2)
Impressum