all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Jeff Kowalski <jeff.kowalski@gmail.com>
To: Jim Porter <jporterbugs@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 13:00:32 -0800	[thread overview]
Message-ID: <CAG-eCj5w_7ppJme8vYBY90wLOXQgaft1evrJGX4XAkNf7Rr9MA@mail.gmail.com> (raw)
In-Reply-To: <381f9df9-4442-4580-17f5-6590f7326e3b@gmail.com>

[-- Attachment #1: Type: text/plain, Size: 1385 bytes --]

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

[-- Attachment #2: Type: text/html, Size: 1900 bytes --]

  reply	other threads:[~2022-11-22 21:00 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
2022-11-22 21:00               ` Jeff Kowalski [this message]
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

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

  git send-email \
    --in-reply-to=CAG-eCj5w_7ppJme8vYBY90wLOXQgaft1evrJGX4XAkNf7Rr9MA@mail.gmail.com \
    --to=jeff.kowalski@gmail.com \
    --cc=56013@debbugs.gnu.org \
    --cc=jporterbugs@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 external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.