apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Wilfredo Sanchez <wsanc...@apache.org>
Date Sat, 07 Dec 2002 22:19:41 GMT
On Saturday, December 7, 2002, at 01:56  PM, Jim Jagielski wrote:

> Wilfredo Sanchez wrote:
>>    I'm on the side that env vars appropriate to the platform should be
>> honored.  But note that BSD Unix and I think POSIX do not dictate such
>> a variable.  TMPDIR, if used, is used at the discretion of
>> applications, not by the system per-se, though it's not uncommon for
>> system applications to do so.  <paths.h> defines _PATH_TMP, which we
>> should use.  Beware this includes the trailing slash, which I think is
>> more of a bother than a help, but whatever.
> But _PATH_TMP is compile time, whereas TMPDIR is runtime, IIRC.
> I would say we can support both (use _PATH_TMP for each OS to
> pick the default, but allow that to be overridden at runtime
> with TMPDIR).

   Yes.  What I'm saying is that to the degree there is a convention on 
Unix to use TMPDIR, that convention is to let the application decide 
whether to use it.

   That implies that the app should, if it wants to, check for TMPDIR, 
and if not set, then call apr_get_tempdir().  Not to have 
apr_get_tempdir() do that for you, which then removes you option to 
ignore TMPDIR.


View raw message