apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jim Jagielski <...@jaguNET.com>
Date Sat, 07 Dec 2002 21:56:25 GMT
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).

>    A note on /var/tmp:  On BSD systems, you have both /tmp and /var/tmp. 
>   The difference is that /var/tmp tends to be longer-lived (files that 
> haven't been accessed in n days get deleted by periodic tasks, n is 
> sometimes larger for /var/tmp), and, unlike /tmp, is not wiped on 
> reboot.  /var/tmp is generally used by system software, but also by 
> editors for backup files (which you'd like to find even if your system 
> crashed).  See hier(7).  Don't know about System V conventions for 
> that.  Anyway, on BSD, I think we want /tmp, not /var/tmp for the 
> default.

Also, I think, that several Un*xes have /tmp as a memory based
directory but not so much with /var/tmp. I think that /tmp
is almost as much a given as /dev/null :)
   Jim Jagielski   [|]   jim@jaguNET.com   [|]   http://www.jaguNET.com/
      "A society that will trade a little liberty for a little order
             will lose both and deserve neither" - T.Jefferson

View raw message