Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ pthread_kill(3T) — DG/UX 5.4R3.00

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

kill(2)

raise(3C)

sigwait(2)

threads(5)



pthread_kill(3T)               DG/UX 5.4R3.00               pthread_kill(3T)


NAME
       pthreadkill - send a signal to a thread

SYNOPSIS
       #include <signal.h>

       int pthreadkill(pthreadt thread, int sig);

   where:
       thread  A thread ID
       sig     A signal number

DESCRIPTION
       The pthreadkill() directs a signal to be asynchronously delivered to
       a thread with thread ID thread.

       As with kill(2), sig can be 0, in which case error checking is
       performed but no signal is actually sent.

DIAGNOSTICS
   Return Value
       If successful, pthreadkill() returns 0.  Otherwise, it returns -1,
       sets errno, and sends no signal.

   Errors
       For the following condition, pthreadkill() returns -1 and sets errno
       to the corresponding value:

       [EINVAL]  The value of the sig argument is an invalid or unsupported
                 signal number.

                 The thread ID specified by thread is invalid.

SEE ALSO
       kill(2), pthreadself(3T), raise(3C), sigwait(2), threads(5).

NOTE
       The pthreadkill() function provides a mechanism for asynchronously
       directing a signal at a thread in the calling process.  This could be
       used, for instance, by one thread to effect broadcast delivery of a
       signal to a set of threads.

       However, in general, the use of signals in multithreaded processes is
       discouraged, as signals are slow and error-prone.













Licensed material--property of copyright holder(s)                         1


Typewritten Software • bear@typewritten.org • Edmonds, WA 98026