]>
Commit | Line | Data |
---|---|---|
d56af11b MK |
1 | .\" Copyright (c) 2010 Michael Kerrisk, <mtk.manpages@gmail.com> |
2 | .\" | |
93015253 | 3 | .\" %%%LICENSE_START(VERBATIM) |
d56af11b MK |
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. | |
7 | .\" | |
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. | |
12 | .\" | |
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 | |
19 | .\" professionally. | |
20 | .\" | |
21 | .\" Formatted or processed versions of this manual, if unaccompanied by | |
22 | .\" the source, must acknowledge the copyright and authors of this work. | |
4b72fb64 | 23 | .\" %%%LICENSE_END |
d56af11b | 24 | .\" |
4b8c67d9 | 25 | .TH PTHREAD_SIGQUEUE 3 2017-09-15 "Linux" "Linux Programmer's Manual" |
d56af11b MK |
26 | .SH NAME |
27 | pthread_sigqueue \- queue a signal and data to a thread | |
28 | .SH SYNOPSIS | |
29 | .nf | |
d795791f | 30 | .B #include <signal.h> |
d56af11b | 31 | .B #include <pthread.h> |
f90f031e | 32 | .PP |
464e572e | 33 | .BI "int pthread_sigqueue(pthread_t " thread ", int " sig , |
d56af11b MK |
34 | .BI " const union sigval " value ); |
35 | .fi | |
68e4db0a | 36 | .PP |
d56af11b | 37 | Compile and link with \fI\-pthread\fP. |
68e4db0a | 38 | .PP |
d56af11b MK |
39 | .in -4n |
40 | Feature Test Macro Requirements for glibc (see | |
41 | .BR feature_test_macros (7)): | |
42 | .in | |
68e4db0a | 43 | .PP |
d56af11b MK |
44 | .BR pthread_sigqueue (): |
45 | _GNU_SOURCE | |
46 | .SH DESCRIPTION | |
47 | The | |
48 | .BR pthread_sigqueue () | |
49 | function performs a similar task to | |
485ab701 | 50 | .BR sigqueue (3), |
34ef249e MK |
51 | but, rather than sending a signal to a process, |
52 | it sends a signal to a thread in the same process as the | |
d56af11b | 53 | calling thread. |
847e0d88 | 54 | .PP |
d56af11b MK |
55 | The |
56 | .I thread | |
34ef249e | 57 | argument is the ID of a thread in the same process as the caller. |
d56af11b MK |
58 | The |
59 | .I sig | |
60 | argument specifies the signal to be sent. | |
61 | The | |
62 | .I value | |
63 | argument specifies data to accompany the signal; see | |
485ab701 | 64 | .BR sigqueue (3) |
d56af11b MK |
65 | for details. |
66 | .SH RETURN VALUE | |
67 | On success, | |
515bca40 | 68 | .BR pthread_sigqueue () |
d56af11b MK |
69 | returns 0; |
70 | on error, it returns an error number. | |
71 | .SH ERRORS | |
72 | .TP | |
73 | .B EAGAIN | |
74 | The limit of signals which may be queued has been reached. | |
75 | (See | |
76 | .BR signal (7) | |
77 | for further information.) | |
78 | .TP | |
79 | .B EINVAL | |
80 | .I sig | |
81 | was invalid. | |
82 | .TP | |
83 | .B ENOSYS | |
84 | .BR pthread_sigqueue () | |
85 | is not supported on this system. | |
86 | .TP | |
87 | .B ESRCH | |
88 | .I thread | |
89 | is not valid. | |
90 | .SH VERSIONS | |
91 | The | |
92 | .BR pthread_sigqueue () | |
93 | function first appeared in glibc 2.11. | |
6328c024 | 94 | .SH ATTRIBUTES |
4ef47cbb PH |
95 | For an explanation of the terms used in this section, see |
96 | .BR attributes (7). | |
97 | .TS | |
98 | allbox; | |
99 | lb lb lb | |
100 | l l l. | |
101 | Interface Attribute Value | |
102 | T{ | |
6328c024 | 103 | .BR pthread_sigqueue () |
4ef47cbb PH |
104 | T} Thread safety MT-Safe |
105 | .TE | |
d56af11b MK |
106 | .SH CONFORMING TO |
107 | This function is a GNU extension. | |
59526510 MK |
108 | .SH NOTES |
109 | The glibc implementation of | |
110 | .BR pthread_sigqueue () | |
111 | gives an error | |
112 | .RB ( EINVAL ) | |
113 | on attempts to send either of the real-time signals | |
114 | used internally by the NPTL threading implementation. | |
115 | See | |
116 | .BR nptl (7) | |
117 | for details. | |
d56af11b | 118 | .SH SEE ALSO |
1770a4b9 | 119 | .BR rt_tgsigqueueinfo (2), |
d56af11b | 120 | .BR sigaction (2), |
2bfa8272 | 121 | .BR pthread_sigmask (3), |
485ab701 | 122 | .BR sigqueue (3), |
7205993b | 123 | .BR sigwait (3), |
d56af11b | 124 | .BR pthreads (7), |
356df505 | 125 | .BR signal (7) |