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(): _GNU_SOURCE
20

DESCRIPTION

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

RETURN VALUE

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

ERRORS

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

VERSIONS

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

ATTRIBUTES

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

CONFORMING TO

58       This function is a GNU extension.
59

NOTES

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

SEE ALSO

66       rt_tgsigqueueinfo(2),  sigaction(2),  pthread_sigmask(3),  sigqueue(3),
67       sigwait(3), pthreads(7), signal(7)
68

COLOPHON

70       This page is part of release 5.02 of the Linux  man-pages  project.   A
71       description  of  the project, information about reporting bugs, and the
72       latest    version    of    this    page,    can     be     found     at
73       https://www.kernel.org/doc/man-pages/.
74
75
76
77Linux                             2017-09-15               PTHREAD_SIGQUEUE(3)
Impressum