1sigqueue(3C)             Standard C Library Functions             sigqueue(3C)
2
3
4

NAME

6       sigqueue - queue a signal to a process
7

SYNOPSIS

9       #include <sys/types.h>
10       #include <signal.h>
11
12       int sigqueue(pid_t pid, int signo, const union sigval value);
13
14

DESCRIPTION

16       The sigqueue() function causes the signal specified by signo to be sent
17       with the value specified by value to the process specified by  pid.  If
18       signo is 0 (the null signal), error checking is performed but no signal
19       is actually sent. The null signal can be used to check the validity  of
20       pid.
21
22
23       The  conditions  required  for  a process to have permission to queue a
24       signal to another process are the same as for the kill(2) function.
25
26
27       The sigqueue() function returns immediately. If SA_SIGINFO is  set  for
28       signo and if the resources were available to queue the signal, the sig‐
29       nal is queued and sent to the receiving process. If SA_SIGINFO  is  not
30       set  for  signo,  then  signo  is  sent  at least once to the receiving
31       process; it is unspecified whether value will be sent to the  receiving
32       process as a result of this call.
33
34
35       If  the  value  of  pid  causes  signo  to be generated for the sending
36       process, and if signo is not blocked for the calling thread and  if  no
37       other thread has signo unblocked or is waiting in a sigwait(2) function
38       for signo, either signo or at least the pending, unblocked signal  will
39       be  delivered  to  the  calling  thread  before the sigqueue() function
40       returns. Should any of multiple pending signals in the  range  SIGRTMIN
41       to  SIGRTMAX  be  selected for delivery, it will be the lowest numbered
42       one. The selection order between realtime and non-realtime signals,  or
43       between multiple pending non-realtime signals, is unspecified.
44

RETURN VALUES

46       Upon successful completion, the specified signal will have been queued,
47       and the sigqueue() function returns  0. Otherwise, the function returns
48       −1 and sets errno to indicate the error.
49

ERRORS

51       The sigqueue() function will fail if:
52
53       EAGAIN     No  resources are available to queue the signal. The process
54                  has already queued SIGQUEUE_MAX signals that are still pend‐
55                  ing  at the receiver(s), or a system wide resource limit has
56                  been exceeded.
57
58
59       EINVAL     The value of signo is an invalid or unsupported signal  num‐
60                  ber.
61
62
63       ENOSYS     The sigqueue() function is not supported by the system.
64
65
66       EPERM      The  process does not have the appropriate privilege to send
67                  the signal to the receiving process.
68
69
70       ESRCH      The process pid does not exist.
71
72

ATTRIBUTES

74       See attributes(5) for descriptions of the following attributes:
75
76
77
78
79       ┌─────────────────────────────┬─────────────────────────────┐
80ATTRIBUTE TYPE               ATTRIBUTE VALUE              
81       ├─────────────────────────────┼─────────────────────────────┤
82       │Interface Stability          │Committed                    │
83       ├─────────────────────────────┼─────────────────────────────┤
84       │MT-Level                     │Async-Signal-Safe            │
85       ├─────────────────────────────┼─────────────────────────────┤
86       │Standard                     │See standards(5).            │
87       └─────────────────────────────┴─────────────────────────────┘
88

SEE ALSO

90       kill(2),    siginfo.h(3HEAD),     signal.h(3HEAD),     sigwaitinfo(3C),
91       attributes(5), standards(5)
92
93
94
95SunOS 5.11                        5 Feb 2008                      sigqueue(3C)
Impressum