看板 DFBSD_commit 關於我們 聯絡資訊
On Thu, Feb 03, 2005 at 07:31:51AM +0800, David Xu wrote: > Linux has exit_group() which I think is used to implement exit(). > FreeBSD introduced thr_exit and kse_exit to exit single thread, > and leave orignal exit() to exit whole process. I haven't looked up the semantic of exit_group, but exit() must terminate the whole program. If we want to fully support POSIX signal sematic, we have introduce another exit mechanism to cancel a part of a thread group. Concerning the cleanup of code, waitpid (or waittid) seems to be enough for my reading of the SUS. It should not be a problem to defer the resource freeing until pthread_detach or pthread_join is called. If I read the requirements correctly, one or the other has to be called by the program anyway. Joerg > > David Xu