[lkml]   [2002]   [Aug]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [patch] exit_free(), 2.5.31-A0

On Tue, 13 Aug 2002, Linus Torvalds wrote:

> > we dont really want any signal overhead, and we also dont want any extra
> > context-switching to the 'master thread'. And there's no master thread
> > anymore either.
> That still doesn't make it any les crap: because any thread that exits
> without calling the "magic exit-flag interface" will then silently be
> lost, with no information left around anywhere.

that should be a pretty rare occurance: with the upcoming signals patch
any segmentation fault zaps all threads and does a proper (and
deadlock-free) multithreaded coredump. Sysadmin doing a kill(1) will get
all threads killed as well. The only possible way for an uncontrolled exit
is for the thread to call sys_exit() explicitly (which is not possible
without the glibc cleanup handlers being called), or for someone to send a
SIGKILL via sys_tkill().

but even in this rare and malicious case, whatever resources a thread has,
they are lost if there's an uncontrolled exit anyway. There's tons of
other stuff that glibc might have to clean up on exit - mutexes,
malloc()s, etc. Thread exit needs to be cooperative, no matter what. The
stack cache does not change this situation the least.


To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2005-03-22 13:28    [W:0.232 / U:0.948 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site