Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

What conditions would cause that thread to disappear?

0
Posted

What conditions would cause that thread to disappear?

0

William, > I have a service thread which enters a never-exiting service loop via > a while(1). What conditions would cause that thread to disappear? You tell it to. Either return(), pthread_exit(), or pthread_cancel(). That’s the only way out. > It can’t be just returning off the end because of the while(1). Past > experience has indicated to me that if a single thread causes a > exception such as a SEGV that the entire process is killed. Are there > known conditions which cause just the thread to exit without > interfering with the rest of the process? You’re right. SEGV etc. kill the process (unless you replace the signal handler). > I suspect there’s stack corruption in this thread, but I would have > expected such corruption to take the form of a SEGV or something > similar. I’m very surprised that just the thread exited leaving > everything else (seemingly) intact. So… you have a problem. I *expect* that you’ll find the place where the thread’s exiting and it’ll be something you

Related Questions

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.

Experts123