1pthread_sigqueue(3)        Library Functions Manual        pthread_sigqueue(3)
2
3
4

NAME

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

LIBRARY

9       POSIX threads library (libpthread, -lpthread)
10

SYNOPSIS

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

DESCRIPTION

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

RETURN VALUE

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

ERRORS

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

ATTRIBUTES

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

VERSIONS

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

STANDARDS

63       GNU.
64

HISTORY

66       glibc 2.11.
67

SEE ALSO

69       rt_tgsigqueueinfo(2),  sigaction(2),  pthread_sigmask(3),  sigqueue(3),
70       sigwait(3), pthreads(7), signal(7)
71
72
73
74Linux man-pages 6.04              2023-03-30               pthread_sigqueue(3)
Impressum