From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: * X-Spam-Status: No, score=1.2 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,PDS_TONAME_EQ_TOLOCAL_SHORT,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 133BCC43331 for ; Wed, 13 Nov 2019 05:51:15 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id E4D1A21783 for ; Wed, 13 Nov 2019 05:51:14 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726105AbfKMFvO (ORCPT ); Wed, 13 Nov 2019 00:51:14 -0500 Received: from albireo.enyo.de ([37.24.231.21]:46000 "EHLO albireo.enyo.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725446AbfKMFvO (ORCPT ); Wed, 13 Nov 2019 00:51:14 -0500 Received: from [172.17.203.2] (helo=deneb.enyo.de) by albireo.enyo.de with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) id 1iUlYd-00068B-7f; Wed, 13 Nov 2019 05:51:11 +0000 Received: from fw by deneb.enyo.de with local (Exim 4.92) (envelope-from ) id 1iUlYd-0006a9-5z; Wed, 13 Nov 2019 06:51:11 +0100 From: Florian Weimer To: enh Cc: "Michael Kerrisk \(man-pages\)" , linux-man@vger.kernel.org Subject: Re: [PATCH] pthread_kill.3: Update to match POSIX. References: <87imnodbct.fsf@mid.deneb.enyo.de> <877e44daom.fsf@mid.deneb.enyo.de> <87woc4bv9c.fsf@mid.deneb.enyo.de> <87imnobufy.fsf@mid.deneb.enyo.de> Date: Wed, 13 Nov 2019 06:51:11 +0100 In-Reply-To: (enh's message of "Tue, 12 Nov 2019 21:27:21 -0800") Message-ID: <87r22c9ve8.fsf@mid.deneb.enyo.de> MIME-Version: 1.0 Content-Type: text/plain Sender: linux-man-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-man@vger.kernel.org * enh: > no, because the C library has two choices when a thread exits: > > 1. unmap the thread. > > 2. keep the thread around for recycling. > > if you choose 1 (optimizing for space, like Android), your dereference > is illegal. This choice is only available for threads in a detached state. For joinable threads, a conforming implementation cannot immediately deallocate all data structures on thread termination. Among other things, it has to store the future return value of pthread_join somewhere.