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.

Thread ID of thread getting stack overflow?

Id overflow stack thread
0
Posted

Thread ID of thread getting stack overflow?

0

Kurt Berg wrote: > We are seeking a PORTABLE way of getting the thread ID > of a thread experiencing a stack overflow. We have to do > some post processing to try to determine, given the thread > ID, what sort of thing to do. > > It is our understanding that pthread_self is NOT “async > signal safe”. > > Thanks in advance. Umm, as I mentioned in my reply to your email, once you buy into the concept of doing “portable” things in a signal handler (which represents a serious ERROR within the process), you’re climbing a steep slope with no equipment. Your fortune cookie says that a disastrous fall is in your future. I also commented that, although pthread_self isn’t required by the standard to be async-signal safe, it probably IS, (or, “close enough”), on most platforms. And in a program that’s done something “naughty” and unpredictable, asynchronously, to its address space, that’s as good as you’re going to get regardless of any standard. However, you neglected to mention in your email th

Related Questions

What is your question?

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

Experts123