From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6818 invoked by alias); 9 Oct 2015 19:01:56 -0000 Mailing-List: contact glibc-bugs-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: glibc-bugs-owner@sourceware.org Received: (qmail 6740 invoked by uid 48); 9 Oct 2015 19:01:51 -0000 From: "nmiell at gmail dot com" To: glibc-bugs@sourceware.org Subject: [Bug libc/6399] gettid() should have a wrapper Date: Fri, 09 Oct 2015 19:01:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: glibc X-Bugzilla-Component: libc X-Bugzilla-Version: unspecified X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: nmiell at gmail dot com X-Bugzilla-Status: REOPENED X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at sourceware dot org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: security- X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2015-10/txt/msg00142.txt.bz2 https://sourceware.org/bugzilla/show_bug.cgi?id=6399 --- Comment #44 from Nicholas Miell --- Well, if we're going to be making design proposals: PIDs (and TIDs) are inherently racy and every API that uses them is broken by design. No new APIs that use pid_t should be created, all existing should be deprecated. They should be completely replaced by file descriptors obtained either from clone()'s return value (since fork() can't take flags) or by opening /proc/$PID (at which point you can safely inspect the process's attributes to verify you have a handle to the thing you wanted). -- You are receiving this mail because: You are on the CC list for the bug.