apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From <...@apache.org>
Date Thu, 05 Dec 2002 20:14:01 GMT

On 5 Dec 2002 cmpilato@collab.net wrote:

> Aaron Bannert <aaron@clove.org> writes:
> > I don't like the idea of having environment variables drive things
> > like this.  Temp directories are a great way to get programs to
> > write files wherever you want. I'd much rather have a function where
> > the global tempdir can be set and then retrieved later by
> > apr_get_temp_dir(). The nice thing about this is it doesn't incur
> > any processing overhead when apr_get_temp_dir() is called, and can
> > let apps like httpd create their own config directive for setting
> > the preferred tempdir.
> Maybe I'm missing something obvious, but if all that exists are
> functions for setting and getting a tempdir, what is APR providing
> except a storage place for a program's code?  I mean, that ignores the
> whole point of having it in APR -- the *portability* aspect.

Exactly!  And, if the platform uses environment variables to set temp
directories, then that is what APR should use too.  The idea behind APR
has always been to get programs to behave like native programson all
platforms.  That means that if the admin sets the TEMPDIR environment
variable, and expects all temporary files to show up in that directory,
then we _need_ to respect that.


View raw message