1rt_sigqueueinfo(2)            System Calls Manual           rt_sigqueueinfo(2)
2
3
4

NAME

6       rt_sigqueueinfo, rt_tgsigqueueinfo - queue a signal and data
7

LIBRARY

9       Standard C library (libc, -lc)
10

SYNOPSIS

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

DESCRIPTION

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

RETURN VALUE

80       On success, these system calls return 0.  On error, they return -1  and
81       errno is set to indicate the error.
82

ERRORS

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

STANDARDS

100       Linux.
101

HISTORY

103       rt_sigqueueinfo()
104              Linux 2.2.
105
106       rt_tgsigqueueinfo()
107              Linux 2.6.31.
108

NOTES

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

SEE ALSO

118       kill(2), pidfd_send_signal(2), sigaction(2), sigprocmask(2), tgkill(2),
119       pthread_sigqueue(3), sigqueue(3), signal(7)
120
121
122
123Linux man-pages 6.05              2023-03-30                rt_sigqueueinfo(2)
Impressum