Skip Navigation Links | |
Exit Print View | |
Multithreaded Programming Guide Oracle Solaris 11.1 Information Library |
1. Covering Multithreading Basics
4. Programming with Synchronization Objects
5. Programming With the Oracle Solaris Software
Forking Issues in Process Creation
Fork-One Safety Problem and Solution
Profiling a Multithreaded Program
Nonlocal Goto: setjmp and longjmp
Setting the Thread's Signal Mask
Sending a Signal to a Specific Thread
Waiting for a Specified Signal
Waiting for Specified Signal Within a Given Time
Signal Handlers and Async-Signal Safety
Interrupted Waits on Condition Variables
I/O as a Remote Procedure Call
Waiting for I/O Operation to Complete
Shared I/O and New I/O System Calls
New System Calls For Reliable Multithreaded Programming
6. Programming With Oracle Solaris Threads
Both the exec(2) and exit(2) system calls work as these functions do in single-threaded processes with the following exception. In a multithreaded application, the functions destroy all the threads in the address space. Both calls block until all the execution resources, and so all active threads, are destroyed.
When exec() rebuilds the process, exec() creates a single lightweight process (LWP). The process startup code builds the initial thread. As usual, if the initial thread returns, the thread calls exit() and the process is destroyed.
When all the threads in a process exit, the process exits. A call to any exec() function from a process with more than one thread terminates all threads, and loads and executes the new executable image. No destructor functions are called.