delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/1999/03/23/09:08:18

To: djgpp-workers AT delorie DOT com
Subject: Re: More TMPDIR strangeness
References: <199903211157 DOT MAA04465 AT father DOT ludd DOT luth DOT se> <20aex7kntt DOT fsf AT Sky DOT inp DOT nsk DOT su> <199903231108 DOT GAA18781 AT mescaline DOT gnu DOT org>
From: Michael Bukin <M DOT A DOT Bukin AT inp DOT nsk DOT su>
Date: 23 Mar 1999 18:24:17 +0600
In-Reply-To: Eli Zaretskii's message of "Tue, 23 Mar 1999 06:08:13 -0500"
Message-ID: <20vhfsjswe.fsf@Sky.inp.nsk.su>
Lines: 54
X-Mailer: Gnus v5.5/Emacs 19.34
Reply-To: djgpp-workers AT delorie DOT com

Eli Zaretskii <eliz AT gnu DOT org> writes:

> Emacs doesn't use temporary-file-directory for temporary files used to
> redirect the standard streams of sub-processes.  So the files.el code
> is not relevant to this particular problem.

call-process-region uses the value of temp-file-name-pattern as a
pattern for making temporary files.  This variable is set from $TMPDIR
or points to /tmp.

> 
>    for ms-dos and windows.  The only reason I can imagine is faster
>    startup (TEMP is more likely to be defined in ms-dos), but it is
>    somewhat ridiculous.
> 
> Why ridiculous?  The NT port is maintained by other people, and
> different people have different considerations on what's right and
> what's wrong.

It was just my IMHO, I did not mean to say that maintainers of NTEmacs
don't know what they are doing.  BTW, I'm using NTEmacs more than
DJGPP Emacs, but only because of nicer fonts and colors, obviously
DJGPP Emacs works better with the rest of DJGPP.

> 
> Note that in 20.3, TMPDIR will also be used, since msdos.c defines it
> at startup.  So it's a moot point anyway.

I have a story about call-process-region and TMPDIR.  I'm using
Emacs-19.34 on Unix and have written some functions to obtain notice
board messages from Novell server by ftp in order to read them with
Gnus.  Because NB is closed for anonymous ftp access I have to use my
own account on that server and pass my user name and password to ftp
program.  I prepare ftp commands in a buffer and run ftp with
call-process-region and then parse the output of ftp.  It all works
nicely, but then I noticed that Emacs creates temporary files in /tmp
directory with contents of that buffer and my password.  I tried to
point TMPDIR to another directory closed for world and group access,
but temporary files are still created in /tmp by call-process-region.
Now I write ftp commands into temporary file and run call-process on
it.  If all temporary files were created in TMPDIR, TEMP, TMP or /tmp
then it would work as expected, and users (in this case me) will not
need to look in the sources to understand exact Emacs's behaviour.


P.S.  All of this is just IMHO, and because I don't know all the
details about Emacs internals (e.g. what is required for dumping) I
can only tell that handling of temporary files does not look right.

-- 
Michael Bukin

-- 
Michael Bukin

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019