apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dirk-Willem van Gulik <di...@webweaving.org>
Date Fri, 06 Dec 2002 08:31:02 GMT

On Thu, 5 Dec 2002, Aaron Bannert wrote:

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

Over the years the same discussion has been had in various unix forums -
and I have a strong feeling that the consensus reached there (or at least
the working assumption) that the ability to get a 'free to use' directory
reference was BAD - and that you are better off asking for a temp file
name; as to avoid clashes and all sorts of other mayem.

What is the reason we MUST have a tempdir getter ? Just because there is
one on windows ? Is it really not enough to just do tempfile() getting ?

It just feels like an operational rat hole (think for example a secure


View raw message