Книга: Programming with POSIX® Threads

6.2 exec

6.2 exec

The exec function isn't affected much by the presence of threads. The function of exec is to wipe out the current program context and replace it with a new program. A call to exec immediately terminates all threads in the process except the thread calling exec. They do not execute cleanup handlers or thread-specific data destructors — the threads simply cease to exist.

All synchronization objects also vanish, except for pshared mutexes (mutexes created using the PTHREAD_PROCESS_SHARED attribute value) and pshared condition variables, which remain usable as long as the shared memory is mapped by some process. You should, however, unlock any pshared mutexes that the current process may have locked — the system will not unlock them for you.

Оглавление книги

Оглавление статьи/книги

Генерация: 0.075. Запросов К БД/Cache: 2 / 0
поделиться
Вверх Вниз