GNU bug report logs - #56013
28.1; "gio open" and "xdg-open" fail silently under eshell

Previous Next

Package: emacs;

Reported by: Jeff Kowalski <jeff.kowalski <at> gmail.com>

Date: Thu, 16 Jun 2022 06:27:02 UTC

Severity: normal

Merged with 75304

Found in versions 28.1, 29.4

Full log


Message #29 received at 56013 <at> debbugs.gnu.org (full text, mbox):

From: Jim Porter <jporterbugs <at> gmail.com>
To: Jeff Kowalski <jeff.kowalski <at> gmail.com>
Cc: Andreas Schwab <schwab <at> linux-m68k.org>, Lars Ingebrigtsen <larsi <at> gnus.org>,
 56013 <at> debbugs.gnu.org
Subject: Re: bug#56013: 28.1; "gio open" and "xdg-open" fail silently under
 eshell
Date: Tue, 22 Nov 2022 12:19:56 -0800
On 11/20/2022 9:14 PM, Jeff Kowalski wrote:
> While I cannot help to craft the solution (I'm limited by my knowledge 
> of internals here), I'm very happy to help test proposals.  It seemed 
> there was a hint of a solution developed in this thread.

This is a hacky workaround, but if it works for you, it would help prove 
a strategy to fix this:

  ~ $ cat | xdg-open file.txt | cat

The above forces 'xdg-open' to be run with pipes for its stdin and 
stdout. I believe the issue is that when 'xdg-open' sees a PTY for 
stdin/stdout, it seems to assume that the PTY will live for a long time; 
however, in Eshell, it will close the PTY as soon as 'xdg-open' returns, 
which breaks things.

A real fix would be to tell Eshell that certain programs, like xdg-open, 
should never use PTYs. (There used to be a variable called 
'eshell-needs-pipe' that did something similar to this, but after 
changing how Eshell connects processes, it was no longer needed.)




This bug report was last modified 155 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.