unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#62093: [PATCH] Let processes read nothing from stdin in tramp
@ 2023-10-25 11:40 Aleksander Trofimowicz
  2023-11-04 17:42 ` Michael Albinus
  0 siblings, 1 reply; 8+ messages in thread
From: Aleksander Trofimowicz @ 2023-10-25 11:40 UTC (permalink / raw)
  To: bug-gnu-emacs; +Cc: tramp-devel

[-- 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


^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2023-12-24 10:32 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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
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

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