[darcs-users] Re: predictable temp file name
Michael Price
ectospheno at gmail.com
Mon Jun 26 04:55:43 UTC 2006
On Jun 25, 2006, at 8:01 AM, Jon Dowland wrote:
> At 1151095688 past the epoch, Jan Braun wrote:
>> Basically, /tmp is a bad idea, and since darcs can safely
>> write to _darcs, it should do so.
>
> /tmp (or $TMPDIR) is a fine idea, as long as you protect
> against symlink attacks using an atomic method such as
> mkstemp(3). I certainly much prefer it to each application
> keep it's temp files in it's own space and the clutter which
> can result.
I agree. /tmp is there for a reason and there are ways to safely
create files there. I'd rather clean out files in /tmp than have to
find every _darcs on my hard drive and clean those out as well.
Additionally, some of us set TMP TEMP and TMPDIR to values that make
sense on our platform because we know our filesystem layout and
actually want temp files to reside in a certain spot. So respect the
environment variables as well.
Just my $.03
Michael
More information about the darcs-users
mailing list