THREAD_HANDLE_SIGNALS(3T) SysV THREAD_HANDLE_SIGNALS(3T)
NAME
thread_handle_signals - identify thread context
SYNOPSIS
include <apollo/thread.h>
kern_return_t thread_handle_signals(target_thread)
thread_t target_thread;
DESCRIPTION
thread_handle_signals identifies the thread context in which to deliver
UNIX system signals. The default signal handling thread on process
creation is the original thread running in that process.
When a UNIX system signal that has a handler is received, this thread is
the context that runs when the handler runs; its user stack contains the
saved state information. No other thread will be affected by handled
UNIX system signals. They will continue running while the signal handler
thread is in the handler. Note that for any longjmp(3C) executed in a
signal handler, the corresponding setjmp(3C) must have been called by
this thread.
target_thread is the id of the thread that will have UNIX system signals
delivered to it.
Data Structures
The data structures are defined as follows:
thread_t
The basic thread id. This is a black box value that is not
significant outside the thread system. It is guaranteed that no two
active threads on a node will have the same thread id.
kern_return_t
An enumeration of the possible values a system call can return. It
indicates the success or failure of the call. It will either be
[KERN_SUCCESS] to indicate that the call succeeded, or some other
value to describe the reason for the failure.
DIAGNOSTICS
Upon successful completion, the target thread is installed as the UNIX
system handler thread for its process and thread_handle_signals returns
[KERN_SUCCESS]; otherwise, errno is set to indicate the error.
ERRORS
This function fails if:
[KERN_INVALID_ARGUMENT]
The thread id passed in is not valid.
[KERN_PROTECTION_FAILURE]
The process this thread is in does not have sufficient rights
to set the signal handling thread in the target process.
SEE ALSO
thread_create(3T), thread_terminate(3T), thread_suspend(3T),
thread_resume(3T), thread_abort(3T), thread_self(3T), thread_info(3T),
thread_state(3T), thread_set_priority(3T), thread_inhibit(3T),
thread_cleanup(3T), thread_startup(3T), threadp_init(3T),
threadp_set(3T), threadp_get(3T).
Section (3P) pthread calls (IEEE P1003.4a) calls
Domain System Software Release Notes, Software Release 10.4
NOTES
This call is one of the set of Domain/OS extensions to the Mach thread
interface.
This call is provided solely for compatibility with the Mach operating
system. New applications should use the Pthread interface instead.