10 | | 1. wrap ALL calls to ::exit with a method that stores the exit value |
11 | | 2. use atexit() to hook up an exit handler that first signals the main thread, and then suspends itself |
12 | | 3. create a signal handler that kill_threads the other threads, and after they have all died, performs exit_thread() with the stored exit value |
| 10 | 1. wrap ALL calls to ::exit with |
| 11 | a method that stores the exit value |
| 12 | 2. use atexit() to hook up an exit handler |
| 13 | that first signals the main thread, |
| 14 | and then suspends itself |
| 15 | 3. create a signal handler that kill_threads |
| 16 | the other threads, and after they have |
| 17 | all died, performs exit_thread() |
| 18 | with the stored exit value |