Subject: Re: bug#12972: [PATCH] Avoid regression in mailcap-view-file similar to Bug#44824

From: Eli Zaretskii <[email-masked]>
Date: Mon, 05 Jul 2021 18:23:54 +0300

> From: Maxim Nikulin <[email-masked]>
> Date: Mon, 5 Jul 2021 20:12:34 +0700
> 
> It is about proper way to a launch viewer in 
> `mailcap-view-file'. Original `start-process-shell-command' with 'pty 
> connection type prematurely kills children of kde-open5 or gio open. 
> With 'pipe connection type it or `make-process' might make emacs CPU 
> hungry if a child decides to close stdout and stderr:
> 
> >> #!/bin/sh
> >> exec 1>&-
> >> exec 2>&-
> >> sleep 30

Is the above something a file viewer is likely to do?

And if it does, how would you suggest to countermand that?

> and finally `process-file-shell-command' does not allow to report 
> failure.

The original code uses start-process-shell-command, and I don't think
I understand why you wanted to call process-file-shell-command
instead.  Can you explain?