Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id ; Fri, 16 Aug 2002 08:31:32 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id ; Fri, 16 Aug 2002 08:31:32 -0400 Received: from pc-62-30-255-50-az.blueyonder.co.uk ([62.30.255.50]:36833 "EHLO kushida.apsleyroad.org") by vger.kernel.org with ESMTP id ; Fri, 16 Aug 2002 08:31:31 -0400 Date: Fri, 16 Aug 2002 13:34:56 +0100 From: Jamie Lokier To: Ingo Molnar Cc: Linus Torvalds , linux-kernel@vger.kernel.org Subject: Re: [patch] user-vm-unlock-2.5.31-A2 Message-ID: <20020816133456.A342@kushida.apsleyroad.org> References: <20020816040902.A31570@kushida.apsleyroad.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5.1i In-Reply-To: ; from mingo@elte.hu on Fri, Aug 16, 2002 at 12:02:00PM +0200 Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1440 Lines: 32 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/