1PTHREAD_SIGQUEUE(3)        Linux Programmer's Manual       PTHREAD_SIGQUEUE(3)
2
3
4

NAME

6       pthread_sigqueue - queue a signal and data to a thread
7

SYNOPSIS

9       #include <signal.h>
10       #include <pthread.h>
11
12       int pthread_sigqueue(pthread_t thread, int sig,
13                            const union sigval value);
14
15       Compile and link with -pthread.
16
17   Feature Test Macro Requirements for glibc (see feature_test_macros(7)):
18
19       pthread_sigqueue():
20           _GNU_SOURCE
21

DESCRIPTION

23       The pthread_sigqueue() function performs a similar task to sigqueue(3),
24       but, rather than sending a signal to a process, it sends a signal to  a
25       thread in the same process as the calling thread.
26
27       The  thread  argument  is the ID of a thread in the same process as the
28       caller.  The sig argument specifies the signal to be sent.   The  value
29       argument  specifies  data  to accompany the signal; see sigqueue(3) for
30       details.
31

RETURN VALUE

33       On success, pthread_sigqueue() returns 0; on error, it returns an error
34       number.
35

ERRORS

37       EAGAIN The limit of signals which may be queued has been reached.  (See
38              signal(7) for further information.)
39
40       EINVAL sig was invalid.
41
42       ENOSYS pthread_sigqueue() is not supported on this system.
43
44       ESRCH  thread is not valid.
45

VERSIONS

47       The pthread_sigqueue() function first appeared in glibc 2.11.
48

ATTRIBUTES

50       For an  explanation  of  the  terms  used  in  this  section,  see  at‐
51       tributes(7).
52
53       ┌────────────────────────────────────────────┬───────────────┬─────────┐
54Interface                                   Attribute     Value   
55       ├────────────────────────────────────────────┼───────────────┼─────────┤
56pthread_sigqueue()                          │ Thread safety │ MT-Safe │
57       └────────────────────────────────────────────┴───────────────┴─────────┘
58

CONFORMING TO

60       This function is a GNU extension.
61

NOTES

63       The  glibc implementation of pthread_sigqueue() gives an error (EINVAL)
64       on attempts to send either of the real-time signals used internally  by
65       the NPTL threading implementation.  See nptl(7) for details.
66

SEE ALSO

68       rt_tgsigqueueinfo(2),  sigaction(2),  pthread_sigmask(3),  sigqueue(3),
69       sigwait(3), pthreads(7), signal(7)
70

COLOPHON

72       This page is part of release 5.13 of the Linux  man-pages  project.   A
73       description  of  the project, information about reporting bugs, and the
74       latest    version    of    this    page,    can     be     found     at
75       https://www.kernel.org/doc/man-pages/.
76
77
78
79Linux                             2021-03-22               PTHREAD_SIGQUEUE(3)
Impressum