Subject: Re: bug#44824: 27.1; Org export as pdf and open file does not open it

From: Maxim Nikulin <[email-masked]>
Date: Wed, 27 Jan 2021 19:14:21 +0700

On 27/01/2021 10:36, Lars Ingebrigtsen wrote:
> 
>> Executing the command "xdg-open /path/to/file.pdf" in a terminal
>> (Konsole) works.

The problem may be related to SIGHUP sent to children due to pty created 
by emacs and closed as soon as the handler exits:

https://orgmode.org/list/[email-masked]/

As a workaround you could try to set another handler for PDF files in 
mailcap, e.g. okular directly without xdg-open wrapper. Handler should 
not try to launch actual application in background with immediate exit.

Currently start-process elisp function is used internally in 
org-open-file. Low level (make-process :connection-type 'pipe ...) 
should allow to avoid pty+SIGHUP problem. Maybe there are some 
consequences of such change that I am not aware of.