3 ms·
You generally should not be writing your watchdog logic in the same code doing the actual work!! Use signals and other processes!
by iamleppert 11y ago
You generally should not be writing your watchdog logic in the same code doing the actual work!! Use signals and other processes!
- colanderman 11y agoYes, this. Threads are not a resource to be monitored and managed; processes are. Similar wisdom hides in the pthread_join(3) man page: There is no pthreads analog of waitpid(-1, &status, 0), that is, "join with any terminated thread". If you believe you need this functional‐ ity, you probably need to rethink your application design.