unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Aleksander Trofimowicz <trof@n90.eu>
To: bug-gnu-emacs@gnu.org
Cc: tramp-devel@gnu.org
Subject: bug#62093: [PATCH] Let processes read nothing from stdin in tramp
Date: Wed, 25 Oct 2023 11:40:13 +0000	[thread overview]
Message-ID: <87wmvaudbi.fsf@n90.eu> (raw)

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

This minor patch is about adjustments in the terminal line settings.

There are programs, which control flow depends on receiving 0
from a read call on stdin. A notable example is git.

--
Thanks,
at

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-Let-processes-read-nothing-from-stdin-in-tramp.patch --]
[-- Type: text/x-patch, Size: 1257 bytes --]

From c4397c3261b9188262a1adee278075893410fb60 Mon Sep 17 00:00:00 2001
From: Aleksander Trofimowicz <trof@n90.eu>
Date: Wed, 25 Oct 2023 11:02:00 +0000
Subject: [PATCH] Let processes read nothing from stdin in tramp

There are programs, which control flow depends on receiving 0
from a read call on stdin. A notable example is git.

* lisp/net/tramp-sh.el (tramp-sh-handle-make-process): Use read
timeout instead of a minimal amount of data to be read in the
terminal line settings. (Bug#62093)
---
 lisp/net/tramp-sh.el | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/lisp/net/tramp-sh.el b/lisp/net/tramp-sh.el
index ba6dbdf0c39..a26c1e3fcc0 100644
--- a/lisp/net/tramp-sh.el
+++ b/lisp/net/tramp-sh.el
@@ -3093,9 +3093,9 @@ tramp-sh-handle-make-process
 			      ;; FIXME: Shall we rather use "stty raw"?
 			      (if (tramp-check-remote-uname v "Darwin")
 				  (tramp-send-command
-				   v "stty -icanon min 1 time 0")
+				   v "stty -icanon min 0 time 1")
 				(tramp-send-command
-				 v "stty -icrnl -icanon min 1 time 0")))
+				 v "stty -icrnl -icanon min 0 time 1")))
 			    ;; `tramp-maybe-open-connection' and
 			    ;; `tramp-send-command-and-read' could
 			    ;; have trashed the connection buffer.
-- 
2.42.0


             reply	other threads:[~2023-10-25 11:40 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-25 11:40 Aleksander Trofimowicz [this message]
2023-11-04 17:42 ` bug#62093: [PATCH] Let processes read nothing from stdin in tramp 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
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=87wmvaudbi.fsf@n90.eu \
    --to=trof@n90.eu \
    --cc=bug-gnu-emacs@gnu.org \
    --cc=tramp-devel@gnu.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).