505 Subj : Re: exit_group: unfinished ... exit status 144 To : comp.programming.threads From : annamalai.gurusami Date : Fri Aug 19 2005 03:32 am loic-dev@gmx.net wrote: > But I believe, you could avoid cancelling threads in the atexit > handlers and use another solution, based e.g. on condition variable. > This works. So, this problem is also related to thread cancellation?! I think, now I have to seriously think about implementing this using alternate methods. Just for the context, I wanted to explain the current scenario. We have two APIs called BlzSys::open() and BlzSys::close(). If the application is like this int main() { BlzSys::open(); // this creates two threads. // registers atexit handlers. BlzSys::close(); // this does thread cancellation stuff exit(0); } Then it works fine. But if the application does int main() { BlzSys::open(); exit(0); // atexit handler calls BlzSys::close() } And this does NOT work fine! The strace showed that exit_group somehow fails in this scenario. No idea why. I guess re-writing this part of the code, using condition variables might solve the problem. Have to code it up and check it. Thanks for your response. Rgds, anna . 0