This is the mail archive of the
glibc-bugs@sourceware.org
mailing list for the glibc project.
[Bug libc/6399] gettid() should have a wrapper
- From: "nmiell at gmail dot com" <sourceware-bugzilla at sourceware dot org>
- To: glibc-bugs at sourceware dot org
- Date: Fri, 09 Oct 2015 19:01:51 +0000
- Subject: [Bug libc/6399] gettid() should have a wrapper
- Auto-submitted: auto-generated
- References: <bug-6399-131 at http dot sourceware dot org/bugzilla/>
https://sourceware.org/bugzilla/show_bug.cgi?id=6399
--- Comment #44 from Nicholas Miell <nmiell at gmail dot com> ---
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.