From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Jim Porter Newsgroups: gmane.emacs.bugs Subject: bug#56013: 28.1; "gio open" and "xdg-open" fail silently under eshell Date: Tue, 22 Nov 2022 12:19:56 -0800 Message-ID: <381f9df9-4442-4580-17f5-6590f7326e3b@gmail.com> References: <87h74kes5l.fsf@gnus.org> <87czf88yre.fsf@igel.home> <87ilozbivd.fsf@gnus.org> <292942b6-4a7f-0002-2af4-210b32612ba1@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="10935"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Andreas Schwab , Lars Ingebrigtsen , 56013@debbugs.gnu.org To: Jeff Kowalski Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Nov 22 21:21:17 2022 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oxZlc-0002he-Ke for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 22 Nov 2022 21:21:16 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oxZlS-0003iT-LY; Tue, 22 Nov 2022 15:21:06 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oxZlO-0003hx-Lp for bug-gnu-emacs@gnu.org; Tue, 22 Nov 2022 15:21:04 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oxZlO-0000IF-DA for bug-gnu-emacs@gnu.org; Tue, 22 Nov 2022 15:21:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oxZlO-0001LO-9T for bug-gnu-emacs@gnu.org; Tue, 22 Nov 2022 15:21:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Jim Porter Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 22 Nov 2022 20:21:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 56013 X-GNU-PR-Package: emacs Original-Received: via spool by 56013-submit@debbugs.gnu.org id=B56013.16691484085071 (code B ref 56013); Tue, 22 Nov 2022 20:21:02 +0000 Original-Received: (at 56013) by debbugs.gnu.org; 22 Nov 2022 20:20:08 +0000 Original-Received: from localhost ([127.0.0.1]:52625 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oxZkW-0001Ji-GW for submit@debbugs.gnu.org; Tue, 22 Nov 2022 15:20:08 -0500 Original-Received: from mail-pg1-f177.google.com ([209.85.215.177]:41565) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oxZkU-0001J7-1H for 56013@debbugs.gnu.org; Tue, 22 Nov 2022 15:20:07 -0500 Original-Received: by mail-pg1-f177.google.com with SMTP id q71so14985817pgq.8 for <56013@debbugs.gnu.org>; Tue, 22 Nov 2022 12:20:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:mime-version:date:message-id:from:to:cc :subject:date:message-id:reply-to; bh=Ytjl4SQW9VR1yF3UYr2bbQ6r/M3tEXJPBaXmpQoNHKU=; b=L9kjJCoNiJriJ2ssk/CBIu4OjkjKQ3ihzfP3WfUDVZ9w7TPj1biatpBR6l+2LaBVBj 9ePpOFiwqSy2RJcuT+7NHv0dX+1MWY2tbQQEvGQE4nDQ5J9w0ZG0YsCWS+l3SuYEnLrC GOa2425Mo42/D5NfFKZxFHkG0c22jkBNX5Djp57gmR6MQea1fU+gbQe7up2WgMPWLrtd YA3WfBZfDPK3D/B0VUMWM9fA7QTx+w/U3e4PNy1xEou3Ovx+HUZNqRUvd7HQS+mMuHk/ cZmX54ZgUgTRSgkdp3lrjg5vEsIeJ7RWlVtCWaOKWgFIObJCXp6gCbQWcdb4JJjmKl9z Htjw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=Ytjl4SQW9VR1yF3UYr2bbQ6r/M3tEXJPBaXmpQoNHKU=; b=fPWLkWVSvj27TGqzuzMGeYuN3NBLEDwTuNfzFt2CRY1LMP4F8yuIpnCKFdtVWhahPt t3gN//ctKkPOrU0jT2mLPfMDxJkGxjRSqRDQFI4LAb2TAQp2Ao8Re33HfMUo9g3kCpy+ WIHym5n85+49PA/OqzI82MCplEw2SEIy+Zd4+xSPoTiqxs9/E+DMcTBLnFEWkOwU6P/w g71Kckh+biheiHIFg7ggyDsH3WS7i6LGk8VceC3sq7K/kb8IoOIYWCMD5I2NhFBPNVkw O9ztO94ytAhOl/H0UTbd2XNhj+MGbNtNp0k1gDj+SB4gU6K0XKmhNg85rPiHTvVeJ36Y 7X6g== X-Gm-Message-State: ANoB5pk86aWgXtMwwznO5MsQieoID+wLlAZnKMr9B82x48dG8RHmZn4I /nmQ5+DwfFM35sxDp0/OEI8= X-Google-Smtp-Source: AA0mqf7UejXcPexRqOdInl7Dhhqe78ZJmnr7RqDZpaF6+T0ncuRBVPkaCcBw3QIAYimqFCJlOqFB1A== X-Received: by 2002:a63:5719:0:b0:476:ea7d:3ff6 with SMTP id l25-20020a635719000000b00476ea7d3ff6mr6108323pgb.73.1669148400215; Tue, 22 Nov 2022 12:20:00 -0800 (PST) Original-Received: from [192.168.1.2] (cpe-76-168-148-233.socal.res.rr.com. [76.168.148.233]) by smtp.googlemail.com with ESMTPSA id 135-20020a62178d000000b0056e8eb09d58sm11352072pfx.170.2022.11.22.12.19.58 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 22 Nov 2022 12:19:59 -0800 (PST) Content-Language: en-US In-Reply-To: X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:248674 Archived-At: 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.)