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