Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S262386AbTKDRaM (ORCPT ); Tue, 4 Nov 2003 12:30:12 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S262427AbTKDRaM (ORCPT ); Tue, 4 Nov 2003 12:30:12 -0500 Received: from fw.osdl.org ([65.172.181.6]:19652 "EHLO mail.osdl.org") by vger.kernel.org with ESMTP id S262386AbTKDRaK (ORCPT ); Tue, 4 Nov 2003 12:30:10 -0500 Date: Tue, 4 Nov 2003 09:29:49 -0800 (PST) From: Linus Torvalds To: John M Collins cc: linux-kernel@vger.kernel.org Subject: Re: Semaphores and threads anomaly and bug? In-Reply-To: <3FA7D7A1.2030307@xisl.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 749 Lines: 22 On Tue, 4 Nov 2003, John M Collins wrote: > > I know this isn't defined anywhere but the seems to be an ambiguity and > discrepancy between versions of Unix and Linux over threads and semaphores. > > Do the "SEM_UNDO"s get applied when a thread terminates or when the > "whole thing" terminates? It's entirely up to you. That's what CLONE_SYSVSEM is supposed to determine. However, CLONE_SYSVSEM is fairly recent, and I think you will need to use the new threading libraries to see it. Linus - 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/