[EMAIL PROTECTED] wrote: > I'm not sure that there is no resources(memory) leak after such > termination, despite of using detached threads.
When a process exits, it can't leak memory. The kernel cleans up after the process. > So I think that child processes (threads) must be terminated either > in the same way that is used in thread_pool_clean() or by using non > blocking sem_trywait() in the main loop of thread function and > examining some sort of global variable which will indicate to > terminate. There is NO WAY to properly clean up child processes which are in the middle of doing something. The ONLY thing you can do is to kill them without notice. Sure, in SOME situations the child threads can be cleaned up. But there's no point in worrying about those situations, because there are other situations where you can't clean up. So you might as well give up trying, and just abort. > I do not have experience of threads programming (and has not finally > understood yet logic that is used in threads.c), therefore it would be > desirable to hear your, Alan, opinion in this occasion. I've got lots of opinions. But please understand that I'm not here to instruct you on thread programming. Go read some books or 'man' pages, and try to figure out what the server is doing. If you see any bugs, please report them on the list. Alan DeKok. - List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html