From the symptoms it would seem that way. When I press 'm' on the
text/html part of an email, the '/usr/bin/sensible-browser' shell script
is started (as per mailcap) but then the X11 browser doesn't find temp
file 'mutt.html' in my ~/tmp/.
If I insert a "sleep 10" in '/usr/bin/sensible-browser' between
the browser call and the script's exit, the browser finds the '~/tmp/mutt.html' file.
So it seems that there's a race going on between the browser and Mutt's unlink().
I'm using Mutt 1.10.1, but I haven't seen this problem mentioned in the release notes of more recent versions.
So the correct invocation in this case is to place a sleep or any other
means that makes the invoked script wait the needed amount of time
before it returns.
This is not new behaviour, afaik it has always been like that.
Anyway, I don't think Mutt should remove its temp files at all:
usually there are local policies on when to clean up temporary
directories.
Mutt should just give temp files a unique name and let them there for
the user to do as he pleases.
Roger Bell_West <roger+cmm201905@nospam.firedrake.org> wrote:
Inelegant is using a viewer that returns before it's done its job.So basically any modern browser. All modern browsers return immediately
after receiving a 'new tab' message. It's been like that for a long
time, actually.
Inelegant is using a viewer that returns before it's done its job.
Nope, if a program creates a temp file, it should cleanup after itself
when done with that temp file.
This is *far* from universal.
Rather inelegant, though, isn't it?
Rich <rich@example.invalid> wrote:
Nope, if a program creates a temp file, it should cleanup after itself
when done with that temp file.
Says who? Lynx and w3m don't do that, just to mention a couple of
examples. Lynx cleans up at program quit, which seems sensible.
This is *far* from universal.
All Linux and BSD distros I've seen manage /tmp in some way by
default, usually cleaning it up at reboot (more recently, some Linux
distros use /tmp as a mountpoint for a temporary, possibly RAM-based filesystem).
Anyway, I don't think Mutt should remove its temp files at all: usually
there are local policies on when to clean up temporary directories.
Mutt should just give temp files a unique name and let them there for
the user to do as he pleases.
Whatever. That's no reason to remove the file right after a viewer
returns. Cleaning up temporary files on quit, like Lynx does, is the
way to go.
Your view is narrowed on only a few systems, Mutt runs on more systems
and not even every Linux system has auto-clean on /tmp enabled.
Sysop: | Keyop |
---|---|
Location: | Huddersfield, West Yorkshire, UK |
Users: | 295 |
Nodes: | 16 (2 / 14) |
Uptime: | 07:48:50 |
Calls: | 6,642 |
Calls today: | 2 |
Files: | 12,190 |
Messages: | 5,326,102 |