[lkml]   [2002]   [Aug]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [patch] user-vm-unlock-2.5.31-A2
Ingo Molnar wrote:
> > [...] And I would like this while having the benefit of CLONE_DETACHED -
> > because I want to use this for high performance threading but still be
> > robust - so waitpid() is out.
> like i said in the original email, the point of CLONE_DETACHED is to avoid
> the waitpid() overhead. I also said that exit notification is done via
> mutexes (futexes).

How? Scenario:

1. a thread calls a 3rd party library which was _not_ compiled with
threading in mind. (It shouldn't have to be).

2. 3rd party library sends itself a SIGABRT; perhaps an assertion
failed. (Variants: SIGFPE, library does execve(), etc.)

3. thread exits.... but the mutex was _not_ released

4. I _want_ to report the death to other thread, without having
to poll all my children in my main event loop.

This is a very legitimate and useful kind of thread death, and it's
perfectly safe too. (Not pthreads-conformant, but clone() is useful for
more than just pthreads).

As things are at the moment, you've arranged things so that I can't use
CLONE_DETACHED if I want to catch threads which die unexpectedly.

Why can't I have both at the same time? They are both good.

-- Jamie
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:22    [W:0.089 / U:3.500 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site