From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 90675 invoked by alias); 7 Oct 2016 00:42:26 -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 90647 invoked by uid 89); 7 Oct 2016 00:42:23 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-4.0 required=5.0 tests=AWL,BAYES_00,RCVD_IN_SORBS_SPAM,RP_MATCHES_RCVD,SPF_PASS autolearn=ham version=3.3.2 spammy=Hx-languages-length:749 X-HELO: mailbackend.panix.com X-Gm-Message-State: AA6/9RnC1Ak24asKCUPpPIIP4uFI22oyOfcN+Z8rg3S0wxjoicJlIEq3ZcZymzNmId1nKw7bDimeCZ2vwNQ9LQ== X-Received: by 10.28.88.70 with SMTP id m67mr15559903wmb.14.1475800930779; Thu, 06 Oct 2016 17:42:10 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: References: <20161006172631.GO19318@brightrain.aerifal.cx> <20161006180514.GP19318@brightrain.aerifal.cx> From: Zack Weinberg Date: Fri, 07 Oct 2016 00:42:00 -0000 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: Caching of PID/TID after fork To: =?UTF-8?B?Um9iZXJ0IMWad2nEmWNraQ==?= Cc: Adhemerval Zanella , GLIBC Devel Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-SW-Source: 2016-10/txt/msg00160.txt.bz2 On Thu, Oct 6, 2016 at 5:35 PM, Robert =C5=9Awi=C4=99cki wrote: > > Maybe providing something like fork_with_flags(int flags) would work > here? Seems that most (all?) the projects that I've seen, which use > clone() directly and had problems with caching of TID/PID, basically > need fork with some flags (mainly of the CLONE_NEW* type). Such > function would deal with tid/gid/locks/pthread_atfork as fork does, > but would also OR the provided flags with the canonical ones? I've thought for quite some time that there should be a second clone-wrapper in glibc that doesn't ask for a new stack. It might be better to call it something with "clone" in the name, but I don't care terribly much. zw