tech-net archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
getprotobyname -- thread local or _r?
Hi. This is probably an ancient topic and I didn't search the archives yet.
A quick survey of operating system man pages says that in the vast majority of cases, either getprotobyname etc. returns data in a thread local, or getprotobyname_r, etc. are provided.
getprotobyname uses thread local: OpenBSD, FreeBSD, NT, MacOSX.
getprotobyname_r is provided: Linux, HP-UX, AIX, Solaris.
Sometimes both: Tru64 (_r for compat, thread local for "real").
No-op: Android?
NetBSD seems to be the outlier here.
Some people suggest to wrap one's own users in a lock, but this does not suffice. Everyone's uses within a process must be wrapped with the same lock. And not everyone can be coordinated to do so.
Can this please be "fixed"?
Thank you,
- Jay
Home |
Main Index |
Thread Index |
Old Index