OSDN Git Service

(split) LDP_man-pages: update original to v3.34.
[linuxjm/LDP_man-pages.git] / original / man3 / pthread_sigqueue.3
1 .\" Copyright (c) 2010 Michael Kerrisk, <mtk.manpages@gmail.com>
2 .\"
3 .\" Permission is granted to make and distribute verbatim copies of this
4 .\" manual provided the copyright notice and this permission notice are
5 .\" preserved on all copies.
6 .\"
7 .\" Permission is granted to copy and distribute modified versions of this
8 .\" manual under the conditions for verbatim copying, provided that the
9 .\" entire resulting derived work is distributed under the terms of a
10 .\" permission notice identical to this one.
11 .\"
12 .\" Since the Linux kernel and libraries are constantly changing, this
13 .\" manual page may be incorrect or out-of-date.  The author(s) assume no
14 .\" responsibility for errors or omissions, or for damages resulting from
15 .\" the use of the information contained herein.  The author(s) may not
16 .\" have taken the same level of care in the production of this manual,
17 .\" which is licensed free of charge, as they might when working
18 .\" professionally.
19 .\"
20 .\" Formatted or processed versions of this manual, if unaccompanied by
21 .\" the source, must acknowledge the copyright and authors of this work.
22 .\"
23 .TH PTHREAD_SIGQUEUE 3 2011-09-23 "Linux" "Linux Programmer's Manual"
24 .SH NAME
25 pthread_sigqueue \- queue a signal and data to a thread
26 .SH SYNOPSIS
27 .nf
28 .B #include <pthread.h>
29
30 .BI "int pthread_sigqueue(pthread_t *" thread ", int " sig ,
31 .BI "                     const union sigval " value );
32 .fi
33 .sp
34 Compile and link with \fI\-pthread\fP.
35 .sp
36 .in -4n
37 Feature Test Macro Requirements for glibc (see
38 .BR feature_test_macros (7)):
39 .in
40 .sp
41 .BR pthread_sigqueue ():
42 _GNU_SOURCE
43 .SH DESCRIPTION
44 The
45 .BR pthread_sigqueue ()
46 function performs a similar task to
47 .BR sigqueue (3),
48 but, rather than sending a signal to another process,
49 it sends a signal to another thread in the same process as the
50 calling thread.
51
52 The
53 .I thread
54 argument is the ID of another thread in the same process as the caller.
55 The
56 .I sig
57 argument specifies the signal to be sent.
58 The
59 .I value
60 argument specifies data to accompany the signal; see
61 .BR sigqueue (3)
62 for details.
63 .SH RETURN VALUE
64 On success,
65 .BR pthread_sigqueue ()
66 returns 0;
67 on error, it returns an error number.
68 .SH ERRORS
69 .TP
70 .B EAGAIN
71 The limit of signals which may be queued has been reached.
72 (See
73 .BR signal (7)
74 for further information.)
75 .TP
76 .B EINVAL
77 .I sig
78 was invalid.
79 .TP
80 .B ENOSYS
81 .BR pthread_sigqueue ()
82 is not supported on this system.
83 .TP
84 .B ESRCH
85 .I thread
86 is not valid.
87 .SH VERSIONS
88 The
89 .BR pthread_sigqueue ()
90 function first appeared in glibc 2.11.
91 .SH CONFORMING TO
92 This function is a GNU extension.
93 .SH SEE ALSO
94 .BR rt_tgsigqueueinfo (2),
95 .BR sigaction (2),
96 .BR sigqueue (3),
97 .BR sigwait (3),
98 .BR pthread_sigmask (3),
99 .BR pthreads (7),
100 .BR signal (7)