Re: OT: TMPDIR
Re: OT: TMPDIR
- Subject: Re: OT: TMPDIR
- From: Brian Campbell <email@hidden>
- Date: Fri, 16 Nov 2007 00:09:39 -0500
On Nov 15, 2007, at 4:57 PM, Nathaniel Gray wrote:
This is somewhat off-topic, but considering there are some actual
Apple BSD guys reading this list... What's up with the new TMPDIR
stuff in Leopard?
[n8gray@golux]% env | grep TMP
TMPDIR=/var/folders/w4/w4D9BUXw2RWE7++8ZOIMn++++TU/-Tmp-/
[n8gray@golux]% ls /var/folders
+5/ 9e/ Qd/ w4/ zz/
???
Thanks,
-n8
The one use for this that I've seen so far is when saving documents in
TextEdit (and I'm assuming other NSDocument based applications, but I
haven't tested anything else), instead of writing to the file
directly, it writes a file into one of these temp dirs and then copies
it into its destination.
This has actually caused some problems, since it means that if you try
to change your group ID by changing it in your user preferences and
then chown'ing your home directory, files you save will still be in
the old group since they'll inherit the group from the directory they
were changed in, which is this funny temp directory. Also, it means
that you can't save to a hard-linked file, since rather than writing
to the file directly, it copies the temp file over, thus unlinking the
file.
While Leopard does seem to have a lot of bugs on first release, it's
been one of the most fun releases to poke into the dusty corners of,
in part because stuff like DTrace and Instruments are so handy for
finding information like this out.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
X11-users mailing list (email@hidden)
This email sent to email@hidden
References: | |
| >OT: TMPDIR (From: "Nathaniel Gray" <email@hidden>) |