This is the mail archive of the glibc-bugs@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug libc/6399] gettid() should have a wrapper


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]