]>
Commit | Line | Data |
---|---|---|
a1eaacb1 | 1 | '\" t |
d56af11b MK |
2 | .\" Copyright (c) 2010 Michael Kerrisk, <mtk.manpages@gmail.com> |
3 | .\" | |
5fbde956 | 4 | .\" SPDX-License-Identifier: Linux-man-pages-copyleft |
d56af11b | 5 | .\" |
4c1c5274 | 6 | .TH pthread_sigqueue 3 (date) "Linux man-pages (unreleased)" |
d56af11b MK |
7 | .SH NAME |
8 | pthread_sigqueue \- queue a signal and data to a thread | |
4eb9064e AC |
9 | .SH LIBRARY |
10 | POSIX threads library | |
8fc3b2cf | 11 | .RI ( libpthread ", " \-lpthread ) |
d56af11b MK |
12 | .SH SYNOPSIS |
13 | .nf | |
d795791f | 14 | .B #include <signal.h> |
d56af11b | 15 | .B #include <pthread.h> |
c6d039a3 | 16 | .P |
464e572e | 17 | .BI "int pthread_sigqueue(pthread_t " thread ", int " sig , |
d56af11b MK |
18 | .BI " const union sigval " value ); |
19 | .fi | |
c6d039a3 | 20 | .P |
d39ad78f | 21 | .RS -4 |
d56af11b MK |
22 | Feature Test Macro Requirements for glibc (see |
23 | .BR feature_test_macros (7)): | |
d39ad78f | 24 | .RE |
c6d039a3 | 25 | .P |
d56af11b | 26 | .BR pthread_sigqueue (): |
1dd0d7b4 MK |
27 | .nf |
28 | _GNU_SOURCE | |
29 | .fi | |
d56af11b MK |
30 | .SH DESCRIPTION |
31 | The | |
32 | .BR pthread_sigqueue () | |
33 | function performs a similar task to | |
485ab701 | 34 | .BR sigqueue (3), |
34ef249e MK |
35 | but, rather than sending a signal to a process, |
36 | it sends a signal to a thread in the same process as the | |
d56af11b | 37 | calling thread. |
c6d039a3 | 38 | .P |
d56af11b MK |
39 | The |
40 | .I thread | |
34ef249e | 41 | argument is the ID of a thread in the same process as the caller. |
d56af11b MK |
42 | The |
43 | .I sig | |
44 | argument specifies the signal to be sent. | |
45 | The | |
46 | .I value | |
47 | argument specifies data to accompany the signal; see | |
485ab701 | 48 | .BR sigqueue (3) |
d56af11b MK |
49 | for details. |
50 | .SH RETURN VALUE | |
51 | On success, | |
515bca40 | 52 | .BR pthread_sigqueue () |
d56af11b MK |
53 | returns 0; |
54 | on error, it returns an error number. | |
55 | .SH ERRORS | |
56 | .TP | |
57 | .B EAGAIN | |
58 | The limit of signals which may be queued has been reached. | |
59 | (See | |
60 | .BR signal (7) | |
61 | for further information.) | |
62 | .TP | |
63 | .B EINVAL | |
64 | .I sig | |
65 | was invalid. | |
66 | .TP | |
67 | .B ENOSYS | |
68 | .BR pthread_sigqueue () | |
69 | is not supported on this system. | |
70 | .TP | |
71 | .B ESRCH | |
72 | .I thread | |
73 | is not valid. | |
6328c024 | 74 | .SH ATTRIBUTES |
4ef47cbb PH |
75 | For an explanation of the terms used in this section, see |
76 | .BR attributes (7). | |
77 | .TS | |
78 | allbox; | |
c466875e | 79 | lbx lb lb |
4ef47cbb PH |
80 | l l l. |
81 | Interface Attribute Value | |
82 | T{ | |
9e54434e BR |
83 | .na |
84 | .nh | |
6328c024 | 85 | .BR pthread_sigqueue () |
4ef47cbb PH |
86 | T} Thread safety MT-Safe |
87 | .TE | |
196224f7 | 88 | .SH VERSIONS |
59526510 MK |
89 | The glibc implementation of |
90 | .BR pthread_sigqueue () | |
91 | gives an error | |
92 | .RB ( EINVAL ) | |
93 | on attempts to send either of the real-time signals | |
94 | used internally by the NPTL threading implementation. | |
95 | See | |
96 | .BR nptl (7) | |
97 | for details. | |
4131356c AC |
98 | .SH STANDARDS |
99 | GNU. | |
100 | .SH HISTORY | |
101 | glibc 2.11. | |
d56af11b | 102 | .SH SEE ALSO |
1770a4b9 | 103 | .BR rt_tgsigqueueinfo (2), |
d56af11b | 104 | .BR sigaction (2), |
2bfa8272 | 105 | .BR pthread_sigmask (3), |
485ab701 | 106 | .BR sigqueue (3), |
7205993b | 107 | .BR sigwait (3), |
d56af11b | 108 | .BR pthreads (7), |
356df505 | 109 | .BR signal (7) |