summaryrefslogtreecommitdiff
path: root/lisp/files-x.el
diff options
context:
space:
mode:
authorMax Nikulin <manikulin@gmail.com>2021-07-30 14:00:41 +0200
committerLars Ingebrigtsen <larsi@gnus.org>2021-07-30 14:00:41 +0200
commit920aaef9d95c7b6ac3cbb31f5d2217b620872cab (patch)
tree0d6b1cd02ff5a86de272bff2b116bb915ec205b9 /lisp/files-x.el
parent88ba1a86c2db950a8905d3e2a6215f2225e9b3a6 (diff)
downloademacs-920aaef9d95c7b6ac3cbb31f5d2217b620872cab.tar.gz
emacs-920aaef9d95c7b6ac3cbb31f5d2217b620872cab.tar.bz2
emacs-920aaef9d95c7b6ac3cbb31f5d2217b620872cab.zip
mailcap.el: Avoid xdg-open silent failure
* lisp/net/mailcap.el (mailcap-view-file): Use 'pipe :connection-type instead of 'pty to prevent killing of background process on handler exit. Avoid regression similar to Bug#44824. Problem happens only in some desktop environments where mailcap handler launches actual viewer (as defined in .desktop files and obtained from mimeapps.list) in background. E.g. xdg-open invokes "gio open" or kde-open5 for Gnome or KDE accordingly and these handlers launch e.g. eog or okular in background. As soon as main process exits, temporary terminal session created by `start-process-shell-command' is terminated. As a result background processes receive SIGHUP. Previously command were executed with no buffer as well, so the change does not affect "needsterminal" and "copiousoutput" mailcap features, they are not supported as earlier. If main process of the handler fails then show a message with exit reason. Output (including error messages) is ignored as before. Gtk applications tend to report significant amount of failed asserts hardly informative for majority of users (bug#12972). Copyright-paperwork-exempt: yes
Diffstat (limited to 'lisp/files-x.el')
0 files changed, 0 insertions, 0 deletions