httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeff Trawick <trawi...@bellsouth.net>
Subject Re: [?PATCH?] using getpwnam_r in mod_userdir
Date Sat, 11 Nov 2000 00:01:32 GMT
Sascha Schumann <sascha@schumann.cx> writes:

> > Another issue (perhaps not affecting more than one system): it
> > assumes that getpwnam() isn't thread-safe.  If getpwnam() is
> > thread-safe, we don't need the lock and we don't need to copy.
> 
>     If it is thread-safe (i.e. it uses thread-specific storage
>     instead of static storage), the vendor should provide
>     getpwnam_r. In fact, getpwnam should then only be a wrapper
>     around getpwnam_r.

This isn't about *should* :(

>     Are there any known systems which provide a thread-safe
>     getpwnam and don't have getpwnam_r?

OS/390: no _r functions, standard ones use thread-specific storage,
_POSIX_THREAD_SAFE_FUNCTIONS is not defined

> > How many of these reentrant function issues have come up with PHP?
> 
>     Well, quite a lot. We try hard to avoid compatibility layers
>     in normal source code, so we use the reentrant interfaces
>     everywhere. [text deleted]

Maybe we should just put the relevant PHP code in APR (changes
required, of course, but not too many as I think your example showed)?  

-- 
Jeff Trawick | trawick@ibm.net | PGP public key at web site:
     http://www.geocities.com/SiliconValley/Park/9289/
          Born in Roswell... married an alien...

Mime
View raw message