I am debugging an issue, where there is a thread which continues to run after the main thread has exited. It is stuck in a loop where it is waiting for another thread to change a variable.
I am trying to understand in what situations a process will continue running after the main thread has exited. I am using
32 bit linux
g++
pthreads
If you exit from your main() function with pthread_exit() then the process will exit when your other thread(s) will finish. It is not abnormal in any way.