NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: lib/54661: pthread_self() returns invalid value in some circumstances

Joerg Sonnenberger <> writes:
>  We didn't allow dynamic loading of libpthread at all for a long time. I
>  still believe allowing it was a mistake, but *shrug*. We certainly do
>  not support calling pthread_create if libpthread was not initially
>  loaded. As much pthread_self() can only ever return the main thread.

Hmm.  So the idea is to lock down to act like the stub
functions, if it's dlopen'd after main() initialization?  Weird, but
no skin off my nose --- from a Postgres-centric viewpoint, we don't
support anybody trying to start additional threads inside a Python
function, anyway.

In that case we should close this as not-a-bug, and I'll go rant
at the Python people that they shouldn't be making an error check
on pthread_self's result.  Or at least, -1 is a really unfortunate
choice of value for PYTHREAD_INVALID_THREAD_ID.

			regards, tom lane

Home | Main Index | Thread Index | Old Index