unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Jim Porter <jporterbugs@gmail.com>
To: Jeff Kowalski <jeff.kowalski@gmail.com>
Cc: Andreas Schwab <schwab@linux-m68k.org>,
	Lars Ingebrigtsen <larsi@gnus.org>,
	56013@debbugs.gnu.org
Subject: bug#56013: 28.1; "gio open" and "xdg-open" fail silently under eshell
Date: Tue, 22 Nov 2022 12:19:56 -0800	[thread overview]
Message-ID: <381f9df9-4442-4580-17f5-6590f7326e3b@gmail.com> (raw)
In-Reply-To: <CAG-eCj5OD_Hzv5A+ON9nuoE+Pwx2zdJrFBAQJu5iQkdNr5DMBg@mail.gmail.com>

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.)





  reply	other threads:[~2022-11-22 20:19 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-16  3:18 bug#56013: 28.1; "gio open" and "xdg-open" fail silently under eshell Jeff Kowalski
2022-06-16 11:58 ` Lars Ingebrigtsen
2022-06-16 14:22   ` Andreas Schwab
2022-06-16 14:32   ` Andreas Schwab
2022-06-17 11:59     ` Lars Ingebrigtsen
2022-06-17 17:17       ` Jim Porter
2022-06-17 18:25         ` Jim Porter
2022-11-21  5:14           ` Jeff Kowalski
2022-11-22 20:19             ` Jim Porter [this message]
2022-11-22 21:00               ` Jeff Kowalski
2022-11-23 22:59                 ` Jim Porter
2022-11-24  3:09                   ` Jeff Kowalski

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=381f9df9-4442-4580-17f5-6590f7326e3b@gmail.com \
    --to=jporterbugs@gmail.com \
    --cc=56013@debbugs.gnu.org \
    --cc=jeff.kowalski@gmail.com \
    --cc=larsi@gnus.org \
    --cc=schwab@linux-m68k.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).