httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject Re: [?PATCH?] using getpwnam_r in mod_userdir
Date Sat, 11 Nov 2000 00:18:20 GMT
On 10 Nov 2000, Jeff Trawick wrote:

> >     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,

That is fine.  The OS/390 case is a non-issue, because it is saying that
we should be using the non _r functions by not defining

This whole problem is bogus.  I am very much leaning towards saying that
since this problem is really unsolvable we should just not support thread
Apache on these platforms.

Before anybody tells me we can work around these issues, remember that we
really have no idea what functions are called internal to the C Run-time,
so we can't fix these problems 100%.  If a platform doesn't provide a
known thread-safe implementation, then we really can't hack a valid
long-term solution.  Imagine the case where both getpwnam and getpwent
make a call to the same function within the C run-time, and we have two
modules one that calls getpwent and one that calls getpwnam.  We can't
protect ourselves from threading issues in that case.  It isn't possible.


Ryan Bloom               
406 29th St.
San Francisco, CA 94131

View raw message