svcadm(8)을 검색하려면 섹션에서 8 을 선택하고, 맨 페이지 이름에 svcadm을 입력하고 검색을 누른다.
pthread_sigqueue(3c)
Standard C Library Functions pthread_sigqueue(3C)
NAME
pthread_sigqueue, pthread_sigqueue_wait - queue a signal to a thread
SYNOPSIS
#include <signal.h>
int pthread_sigqueue(pthread_t thread, int sig,
const union sigval value);
int pthread_sigqueue_wait(pthread_t thread, int sig,
const union sigval value, const struct timespec *timeout);
DESCRIPTION
The pthread_sigqueue() and pthread_sigqueue_wait() functions cause the
signal specified by sig to be sent with the value specified by value to
the thread specified by thread. The thread argument must be a member of
the same process as the calling thread. The sig argument must be one of
the signals listed in siginfo.h(3HEAD), with the exception of SIGCANCEL
being reserved and off limits. If sig is 0, a validity check is per‐
formed for the existence of the target thread; no signal is sent.
The pthread_sigqueue() function returns immediately. In contrast,
pthread_sigqueue_wait() will wait for resources to become available to
queue the signal if the caller's process already has the maximum number
of queued signals allowed per process pending. If the timeout argument
is not NULL, pthread_sigqueue_wait() will wait up to the specified time
interval for the necessary resources to become available. If the time‐
out argument is NULL, pthread_sigqueue_wait() will wait as long as nec‐
essary.
If SA_SIGINFO is set for sig and if the resources were available to
queue the signal, the signal is queued and sent to the target thread.
If SA_SIGINFO is not set for sig, then sig is sent at least once to the
target thread; it is unspecified whether value will be sent to the tar‐
get thread as a result of this call.
If the value of thread causes sig to be generated for the calling
thread, and if sig is not blocked for the calling thread, either sig or
at least another pending, unblocked signal will be delivered to the
calling thread before the pthread_sigqueue() or pthread_sigqueue_wait()
function returns. Should any of multiple pending signals in the range
SIGRTMIN to SIGRTMAX be selected for delivery, it will be the lowest
numbered one. The selection order between realtime and non-realtime
signals, or between multiple pending non-realtime signals, is unspeci‐
fied.
RETURN VALUES
Upon successful completion, for either pthread_sigqueue() or
pthread_sigqueue_wait(), the specified signal will have been sent and
the function returns 0. Otherwise, no signal is sent and the function
returns an error number. It is not an error for the target thread to be
a zombie thread.
ERRORS
The pthread_sigqueue() and pthread_sigqueue_wait() functions will fail
if:
EAGAIN No resources are available to queue the signal within the
specified time, if any. The process has already queued its
maximum number of signals that are still pending at the
receiver(s), or a system wide resource limit has been
exceeded. The maximum number of outstanding queued signals
that a process can have is defined by its process.max-
siqueue-size resource control.
EINVAL The value of sig is an invalid or unsupported signal number
or the timeout argument specifies an invalid time.
ESRCH The target thread does not exist.
The pthread_sigqueue_wait() function will fail if:
EFAULT The timeout argument to pthread_sigqueue_wait() is not NULL
and is an invalid address.
EINTR The pthread_sigqueue_wait() function was interrupted while
waiting.
ATTRIBUTES
See attributes(7) for descriptions of the following attributes:
tab() box; cw(2.75i) |cw(2.75i) lw(2.75i) |lw(2.75i) ATTRIBUTE TYPEAT‐
TRIBUTE VALUE _ Interface StabilityCommitted _ MT-LevelAsync-Signal-
Safe
SEE ALSO
kill(2), pthread_kill(3C), pthread_sigmask(3C), sigqueue(3C), sig‐
info.h(3HEAD), signal.h(3HEAD), attributes(7), resource-controls(7)
Oracle Solaris 11.4 17 Mar 2015 pthread_sigqueue(3C)