possible problem with tempname()

52 views
Skip to first unread message

Lev Lvovsky

unread,
May 2, 2008, 3:25:26 PM5/2/08
to vim...@googlegroups.com
I ran into a problem a while back with the initial temporary directory
created in /tmp by tempname() being wiped out (by some system cleaning
script etc...). This resulted in the gzip functionality breaking. It
seems that to save time, checking for the directory isn't done past
the first creation - could this maybe be added?

I set the TMPDIR env variable to something less dangerous, but it took
a while to track down the problem...

thanks,
-lev

Gary Johnson

unread,
May 2, 2008, 3:50:16 PM5/2/08
to vim...@googlegroups.com

I run into this every now and then, usually when I've left vim
running over the weekend and then system's weekly cleanup-/tmp
script has run. I fix it by noting the name of the missing tmp
directory and just executing ":!mkdir /tmp/123456" or whatever the
directory name is.

I agree, it would be nice if vim could do this itself.

Regards,
Gary

Bram Moolenaar

unread,
May 4, 2008, 4:42:49 PM5/4/08
to Lev Lvovsky, vim...@googlegroups.com

Leve Lvovsky wrote:

The problem is with your system. It must not delete files that are in
use.

I'm using FreeBSD, it doesn't ever delete files in /tmp. Also not when
rebooting. That's to remind programmers that processes should never
leave garbage laying around. FreeBSD systems often run for many months
before rebooting (mine is running two months now, after an upgrade).

--
FATHER: You killed eight wedding guests in all!
LAUNCELOT: Er, Well ... the thing is ... I thought your son was a lady.
FATHER: I can understand that.
"Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD

/// Bram Moolenaar -- Br...@Moolenaar.net -- http://www.Moolenaar.net \\\
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\ download, build and distribute -- http://www.A-A-P.org ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///

Reply all
Reply to author
Forward
0 new messages