]> git.ipfire.org Git - thirdparty/man-pages.git/blame - man3/pthread_sigqueue.3
man*/: srcfix (Use .P instead of .PP or .LP)
[thirdparty/man-pages.git] / man3 / pthread_sigqueue.3
CommitLineData
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
8pthread_sigqueue \- queue a signal and data to a thread
4eb9064e
AC
9.SH LIBRARY
10POSIX 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
22Feature 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
31The
32.BR pthread_sigqueue ()
33function performs a similar task to
485ab701 34.BR sigqueue (3),
34ef249e
MK
35but, rather than sending a signal to a process,
36it sends a signal to a thread in the same process as the
d56af11b 37calling thread.
c6d039a3 38.P
d56af11b
MK
39The
40.I thread
34ef249e 41argument is the ID of a thread in the same process as the caller.
d56af11b
MK
42The
43.I sig
44argument specifies the signal to be sent.
45The
46.I value
47argument specifies data to accompany the signal; see
485ab701 48.BR sigqueue (3)
d56af11b
MK
49for details.
50.SH RETURN VALUE
51On success,
515bca40 52.BR pthread_sigqueue ()
d56af11b
MK
53returns 0;
54on error, it returns an error number.
55.SH ERRORS
56.TP
57.B EAGAIN
58The limit of signals which may be queued has been reached.
59(See
60.BR signal (7)
61for further information.)
62.TP
63.B EINVAL
64.I sig
65was invalid.
66.TP
67.B ENOSYS
68.BR pthread_sigqueue ()
69is not supported on this system.
70.TP
71.B ESRCH
72.I thread
73is not valid.
6328c024 74.SH ATTRIBUTES
4ef47cbb
PH
75For an explanation of the terms used in this section, see
76.BR attributes (7).
77.TS
78allbox;
c466875e 79lbx lb lb
4ef47cbb
PH
80l l l.
81Interface Attribute Value
82T{
9e54434e
BR
83.na
84.nh
6328c024 85.BR pthread_sigqueue ()
4ef47cbb
PH
86T} Thread safety MT-Safe
87.TE
196224f7 88.SH VERSIONS
59526510
MK
89The glibc implementation of
90.BR pthread_sigqueue ()
91gives an error
92.RB ( EINVAL )
93on attempts to send either of the real-time signals
94used internally by the NPTL threading implementation.
95See
96.BR nptl (7)
97for details.
4131356c
AC
98.SH STANDARDS
99GNU.
100.SH HISTORY
101glibc 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)