From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 93544 invoked by alias); 7 Oct 2016 19:38:51 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Received: (qmail 93529 invoked by uid 89); 7 Oct 2016 19:38:51 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-3.6 required=5.0 tests=AWL,BAYES_00,KAM_LAZY_DOMAIN_SECURITY,RP_MATCHES_RCVD autolearn=ham version=3.3.2 spammy=exclusively, Hx-languages-length:692, H*F:U*fw, generators X-HELO: albireo.enyo.de From: Florian Weimer To: Robert =?utf-8?B?xZp3acSZY2tp?= Cc: libc-alpha@sourceware.org Subject: Re: Caching of PID/TID after fork References: Date: Fri, 07 Oct 2016 19:38:00 -0000 In-Reply-To: ("Robert \=\?utf-8\?B\?xZp3acSZY2tpIidz\?\= message of "Thu, 6 Oct 2016 18:13:41 +0200") Message-ID: <87y4202blm.fsf@mid.deneb.enyo.de> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-SW-Source: 2016-10/txt/msg00173.txt.bz2 * Robert =C5=9Awi=C4=99cki: > Thefore I'd like to ask for one of the following solutions: > > 1. Don't cache PID/TID > > 2. Provide some kind of symbol, which would force for TID/PID to be > reloaded in glibc. I think we need a different design. For example, when you clone a process, you really want that all cryptographic random number generators are reinitialized. Making this depend on getpid does not really work, so we need a more general solution. The other question I have is whether we talk about clone-as-fork exclusively. Introducing a new thread into the process on which non-free-standing code can run using clone is a different matter altogether.