]> git.ipfire.org Git - thirdparty/man-pages.git/blob - man3/pthread_sigqueue.3
cd2c22926491bdbebb3f2bd95d3db920ef08002e
[thirdparty/man-pages.git] / man3 / pthread_sigqueue.3
1 '\" t
2 .\" Copyright (c) 2010 Michael Kerrisk, <mtk.manpages@gmail.com>
3 .\"
4 .\" SPDX-License-Identifier: Linux-man-pages-copyleft
5 .\"
6 .TH pthread_sigqueue 3 (date) "Linux man-pages (unreleased)"
7 .SH NAME
8 pthread_sigqueue \- queue a signal and data to a thread
9 .SH LIBRARY
10 POSIX threads library
11 .RI ( libpthread ", " \-lpthread )
12 .SH SYNOPSIS
13 .nf
14 .B #include <signal.h>
15 .B #include <pthread.h>
16 .PP
17 .BI "int pthread_sigqueue(pthread_t " thread ", int " sig ,
18 .BI " const union sigval " value );
19 .fi
20 .PP
21 .RS -4
22 Feature Test Macro Requirements for glibc (see
23 .BR feature_test_macros (7)):
24 .RE
25 .PP
26 .BR pthread_sigqueue ():
27 .nf
28 _GNU_SOURCE
29 .fi
30 .SH DESCRIPTION
31 The
32 .BR pthread_sigqueue ()
33 function performs a similar task to
34 .BR sigqueue (3),
35 but, rather than sending a signal to a process,
36 it sends a signal to a thread in the same process as the
37 calling thread.
38 .PP
39 The
40 .I thread
41 argument is the ID of a thread in the same process as the caller.
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
48 .BR sigqueue (3)
49 for details.
50 .SH RETURN VALUE
51 On success,
52 .BR pthread_sigqueue ()
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.
74 .SH ATTRIBUTES
75 For an explanation of the terms used in this section, see
76 .BR attributes (7).
77 .ad l
78 .nh
79 .TS
80 allbox;
81 lbx lb lb
82 l l l.
83 Interface Attribute Value
84 T{
85 .BR pthread_sigqueue ()
86 T} Thread safety MT-Safe
87 .TE
88 .hy
89 .ad
90 .sp 1
91 .SH VERSIONS
92 The glibc implementation of
93 .BR pthread_sigqueue ()
94 gives an error
95 .RB ( EINVAL )
96 on attempts to send either of the real-time signals
97 used internally by the NPTL threading implementation.
98 See
99 .BR nptl (7)
100 for details.
101 .SH STANDARDS
102 GNU.
103 .SH HISTORY
104 glibc 2.11.
105 .SH SEE ALSO
106 .BR rt_tgsigqueueinfo (2),
107 .BR sigaction (2),
108 .BR pthread_sigmask (3),
109 .BR sigqueue (3),
110 .BR sigwait (3),
111 .BR pthreads (7),
112 .BR signal (7)