This is the mail archive of the
mailing list for the glibc project.
Re: [PATCH] Add finit_module syscall for Linux
On Fri, Jan 25, 2013 at 03:01:37PM -0500, KOSAKI Motohiro wrote:
> On Fri, Jan 25, 2013 at 2:50 PM, Michael Kerrisk (man-pages)
> <email@example.com> wrote:
> > On Fri, Jan 25, 2013 at 8:14 PM, Kees Cook <firstname.lastname@example.org> wrote:
> >> On Fri, Jan 25, 2013 at 9:31 AM, KOSAKI Motohiro
> >> <email@example.com> wrote:
> >>>> gettid(2)
> >>> Very frequently uses. because linux /proc uses tid. pthrad_self()
> >>> don't help us when facing libc/kernel combination issue.
> >>> I have no seen any issue of exporting.
> >> Yeah, I've needed gettid() in multiple situations before. I think
> >> having this available in glibc would be great.
> > http://sourceware.org/bugzilla/show_bug.cgi?id=6399 has been around
> > for a long time now, but didn't get much traction with Ulrich...
> I completely agree with you. If we can roll back time, we should fix
> to return tid because current implementation is POSIX invalid (*).
> however it's impossible and making new interface for getting tid is
> best practical solution.
> (*) pthread_kill() must return -ESRCH if target thread was already
> exited. that imply
> pthread_self() returns pid like id number, not bare C pointer.
false. that's only required if the impl *detects* the condition, and
even then only in outdated posix 2001. posix 2008 clarified the issue.
using kernel tids for pthread_t is a very bad design.