unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Aleksander Trofimowicz via "Bug reports for GNU Emacs, the Swiss army knife of text editors" <bug-gnu-emacs@gnu.org>
To: Michael Albinus <michael.albinus@gmx.de>
Cc: Benjamin Orthen <benjamin@orthen.net>, 62093@debbugs.gnu.org
Subject: bug#62093: [PATCH] Let processes read nothing from stdin in tramp
Date: Fri, 17 Nov 2023 20:10:34 +0000	[thread overview]
Message-ID: <87wmugdpsl.fsf@n90.eu> (raw)
In-Reply-To: <87y1f430al.fsf@gmx.de>

Hi Michael,

Michael Albinus <michael.albinus@gmx.de> writes:

> I cannot speak for the local case. But in Tramp, we need to set "stty
> -icanon ..." for the pipe connection type in order avoid blocking
> situations with larger hunks of data, see the comment there. And the use
> case of magit-start-process would be better with the connection type
> pty, at least when calling Tramp.
>
Re-configuring a TTY device via "-icanon" does not only lift the 4k input
line limit; there are other far-reaching consequences. Most notably: a
handful of the terminal special characters are delivered straight to
stdin of a managed process, which more often than not is unprepared to
handle such a situation (e.g. the VEOF character). I would argue in the
Tramp context doubly so, since the connection-type is set to 'pipe'
somewhere up in a stack. It also invalidates certain expectations most
people have while invoking process-send-eof.

These are reasons magit stopped working, and my patch was a half-baked
attempt to address the problem by other means. Please drop it. At the
same time I would encourage you to revert the change that introduced the
noncanonical mode, since the current state is very confusing and breaks
existing code. A dedicated defcustom should cater for those who deal
with large input data.

Ideally no pty should be allocated if one asks for 'pipe' (by employing
ssh connection multiplexing?).
--
Kind regards,
at





  reply	other threads:[~2023-11-17 20:10 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-25 11:40 bug#62093: [PATCH] Let processes read nothing from stdin in tramp Aleksander Trofimowicz
2023-11-04 17:42 ` Michael Albinus
2023-11-06 16:51   ` Aleksander Trofimowicz via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-11-11 13:08     ` Michael Albinus
2023-11-17 20:10       ` Aleksander Trofimowicz via Bug reports for GNU Emacs, the Swiss army knife of text editors [this message]
2023-11-29 13:27         ` Michael Albinus
2023-12-04 11:05           ` Aleksander Trofimowicz via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-12-24 10:32             ` Michael Albinus via Bug reports for GNU Emacs, the Swiss army knife of text editors

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=87wmugdpsl.fsf@n90.eu \
    --to=bug-gnu-emacs@gnu.org \
    --cc=62093@debbugs.gnu.org \
    --cc=benjamin@orthen.net \
    --cc=michael.albinus@gmx.de \
    --cc=trof@n90.eu \
    /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).