lkml.org 
[lkml]   [2002]   [Aug]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [patch] user-vm-unlock-2.5.31-A2
Ingo Molnar wrote:
> non-POSIX programming methods like JVMs can still implement *any*
> semantics - but your whole example is based on POSIX issues like exit() or
> default signal handlers, not Java.

Sorry if I was unclear. I'm specifically talking about non-POSIX
threading methods (normal C code though, not complicated JVMs).

Most uses of clone() that I've seen are not using any threading library
at all: some code that neads a helper thread calls clone(), and the
child does its own self-contained system calls (to avoid errno pollution).

It's conceptually fine that individual threads can die. _Conceptually_,
clone-by-hand threads are very similar to processes, and I have seen
this used in practice a few times.

And it all works fine: just use SIGCHLD and waitpid().

Now you have written this wonderful resource optimisation, which removes
zombies: CLONE_DETACHED. Unfortunately, catching invidual thread death
relies on the thread "exiting politely", as they say. So I still have
to use SIGCHLD and waitpid(), or a pipe(), for non-POSIX-model threads
that want to robustly detect "impolite" thread death.

I think that's an unfair penalty on non-POSIX-model threads.

-- JAmie
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

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