Thread termination
A thread terminating in a non-POSIX environment is analogous to an enclave terminating, because Language Environment supports only single threads. See Enclave termination for information on enclave termination.
POSIX thread termination
A thread terminates due to
pthread_exit(), pthread_kill(), or
pthread_cancel(), or simply returns from the start routine of the thread in a POSIX
environment. When a thread
issues a exit() or _exit() or encounters an unhandled condition,
that thread terminates and all other active threads are also forced to terminate. The z/OS UNIX (POSIX) environment supports multiple
threads; each thread is terminated, as follows: - The stack storage associated with the thread is freed.
- The thread status is set.
- Cleanup handlers and destructor routines are driven.
- The stack is collapsed.
For more detailed information about POSIX functions, refer to the following resources: