Re: [patch] user-vm-unlock-2.5.31-A2

From: Jamie Lokier (
Date: Fri Aug 16 2002 - 07:34:56 EST

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
More majordomo info at
Please read the FAQ at

This archive was generated by hypermail 2b29 : Fri Aug 23 2002 - 22:00:11 EST