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 #32 received at 56013 <at> debbugs.gnu.org (full text, mbox):

From: Jeff Kowalski <jeff.kowalski <at> gmail.com>
To: Jim Porter <jporterbugs <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 13:00:32 -0800
[Message part 1 (text/plain, inline)]
Thanks for the response and suggestion.
From eshell,
     λ xdg-open file.txt
exits immediately, without opening file.txt, and
     λ cat | xdg-open file.txt | cat
shows the same behavior, but
     λ setsid -w xdg-open file.txt
opens the file as expected.
Hope this helps,
Jeff



On Tue, Nov 22, 2022 at 12:20 PM Jim Porter <jporterbugs <at> gmail.com> wrote:

> 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.)
>
[Message part 2 (text/html, inline)]

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.