GNU bug report logs - #56025
29.0.50; em-extpipe-test-2 times out on EMBA and Cygwin

Previous Next

Package: emacs;

Reported by: Ken Brown <kbrown <at> cornell.edu>

Date: Thu, 16 Jun 2022 18:36:02 UTC

Severity: normal

Found in version 29.0.50

Fixed in version 29.1

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Jim Porter <jporterbugs <at> gmail.com>
To: Ken Brown <kbrown <at> cornell.edu>, Sean Whitton <spwhitton <at> email.arizona.edu>, Eli Zaretskii <eliz <at> gnu.org>
Cc: larsi <at> gnus.org, 56025 <at> debbugs.gnu.org
Subject: bug#56025: [PATCH v2] 29.0.50; em-extpipe-test-2 times out on EMBA and Cygwin
Date: Thu, 21 Jul 2022 21:16:08 -0700
[Message part 1 (text/plain, inline)]
On 7/17/2022 10:26 PM, Jim Porter wrote:
> On 7/17/2022 2:59 PM, Ken Brown wrote:
>> It does work for me too.  Thanks!
> 
> Great! This should make Eshell behave a bit more similarly to other 
> shells, so hopefully this will help prevent other issues in this area.

Ok, I *think* this is done. The patches have docs/tests that should 
hopefully explain everything in detail, but here's a high-level overview:

Patch 1:
--------

Add the ability to pass a cons cell for `:connection-type' to 
`make-process'. This lets you specify whether to use a pipe or pty 
independently for the input and output of the subprocess. This also 
removes the restriction that specifying `:stderr' forces 
`:connection-type' to be `pipe'. Now, it only makes stderr use a pipe.

This should be enough to fix the test failures mentioned in this bug, 
and should also make Eshell pipelines work more like in other shells: 
normally, when executing something like `foo | bar', foo's stdout and 
bar's stdin are pipes.[1]

I also removed the `eshell-needs-pipe-p' function since it's not 
necessary in its current form anymore. However, a new function along 
these lines might help to resolve bug#56013. I looked into this briefly 
and it's not terribly complicated, but it would take a bit of work to 
get right, so I think it'd be best to do it separately.

Patch 2:
--------

Add the ability to check whether each of a subprocess's `stdin', 
`stdout', or `stderr' are TTYs or pipes by passing one of those symbols 
as the second argument to `process-tty-name'. This lets us avoid the 
"send 3 EOFs" behavior most of the time in Eshell. (Note that if a user 
created a subprocess some other way and connected it via Eshell, they 
might need the 3 EOFs behavior, hence why I kept that code around.)

I debated whether `process-tty-name' was the right place to do this or 
if a new `process-connection-type' function would be better, but I went 
with this way in the end. I don't really have a strong preference though.

--------

I added tests for this, and they all pass for me, though admittedly I 
didn't run the entire Emacs test suite against these patches yet...

[1] Note that currently, Eshell always pipes both stdout and stderr (see 
bug#21605). I'm tinkering with a patch for this too.
[0001-Allow-creating-processes-where-only-one-of-stdin-or-.patch (text/plain, attachment)]
[0002-Add-STREAM-argument-to-process-tty-name.patch (text/plain, attachment)]

This bug report was last modified 2 years and 350 days ago.

Previous Next


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