Marcus Harnisch writes:
Everything created below $TMPDIR is temporary by definition.
Temporary
files should be deleted when the creating application believes the
file is not needed any more or when the creating application exits
(but see below).
For practical purposes, XEmacs never exits, so this requirement
amounts to "XEmacs needs to know when the file is not needed any
more." And we know that's difficult.
The invoked application should never explicitly remove a file which
has not been created by the application itself. Obvious exceptions are
programs like /bin/rm, etc.
This requirement says that xdg-open and its subprocesses should never
remove the file. "XEmacs must remove the file itself."
On Windows, the invoked application would keep the file open if
needed, effectively preventing removal.
This behavior is universally hated by people who write unit tests,
precisely because for practical purposes it means that such files are
*never* removed, except when explicitly targeted by the user or a
tmpreaper.
Don't know if this is default behavior
It's the default behavior. However, it's not universal. Many Unix
applications (eg, Emacs or XEmacs) will close the file after it has
been read. Note that some viewers (eg for PDFs) allow you to do some
restricted editing of the document in memory; reverting requires
reading the file again.
On Unixoid systems, the directory entry of a file will be removed
when
the file is deleted so that it effectively becomes non-existent. The
invoked application however, for as long as it holds a file handle,
can access the file normally since the inode still exists. The
physical file disappears automatically as soon as the application
releases the handle. Again, XEmacs deleting a temporary file is not an
issue as long as the invoked application had a chance to grab it while
the file still exists.
No, that's the theory but it's false in practice. XEmacs deleting a
temporary file is not an issue as long as the invoked application both
grabs the file *and* holds an open file descriptor for it. However,
our users may have reasons for using ill-behaved apps as viewers, and
we *know* they exist.
xdg-open calls e.g. gnome-open calls <application> and returns
if
<application> returns. If <application> returns before owning the file
this is not xdg-open's fault and neither gnome-open's. It is some of
<application>'s developers who screwed up.
But we're not here to assign fault. We are here to deal with the
software that our users want to use. It's reasonable to say "Too much
work for us, won't fix", but it is something we could help with.
> Really, XEmacs ought to detect when GNOME or KDE or Windows or
Aqua
> is present, and refuse to start at all on the grounds of gross
> negligence in design of the environment.
He he...
But you see, it *is* a joke. I'd *like* to be able to do that kind of
thing, but really, that's not what I'm here for....
_______________________________________________
XEmacs-Beta mailing list
XEmacs-Beta(a)xemacs.org
http://calypso.tux.org/cgi-bin/mailman/listinfo/xemacs-beta