From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Aleksander Trofimowicz Newsgroups: gmane.emacs.tramp,gmane.emacs.bugs Subject: bug#62093: [PATCH] Let processes read nothing from stdin in tramp Date: Wed, 25 Oct 2023 11:40:13 +0000 Message-ID: <87wmvaudbi.fsf@n90.eu> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="5978"; mail-complaints-to="usenet@ciao.gmane.io" Cc: tramp-devel@gnu.org To: bug-gnu-emacs@gnu.org Original-X-From: tramp-devel-bounces+get-tramp-devel=m.gmane-mx.org@gnu.org Wed Oct 25 14:52:44 2023 Return-path: Envelope-to: get-tramp-devel@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 1qvdNK-0001LY-7w for get-tramp-devel@m.gmane-mx.org; Wed, 25 Oct 2023 14:52:42 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qvdN1-0005oH-2Z; Wed, 25 Oct 2023 08:52:23 -0400 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 1qvcTr-0005jO-N9; Wed, 25 Oct 2023 07:55:23 -0400 Original-Received: from mx.n90.eu ([65.21.251.117]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qvcTg-0004tn-8r; Wed, 25 Oct 2023 07:55:23 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=n90.eu; s=default; t=1698234906; bh=jw+/rGpwl/odTK/kL7eQ77A7cR9uvsMeltfXHNExllk=; h=From:To:Cc:Subject:Date; b=BYhPMYmB1wO2YZ/j+uLX1Bk/BLXxVSd+LEzuucxGsyuByrRe76BU4aIEzGospI68r x7oZBmmd7Rif8s+W17bDcH40o4RN12z6F/xtkpQnWMho/F8Rv90GtqYkblcQyJwnE6 EZpt7tOa2R8cOTzSNozyS3cpMja7ACgzcf4iyYRL7KJkbtGhTPygBJXkJvZNq9Cgo5 P95FrjoYl3KNe1T6Io2fliSOwyFvAjUGSQdZoZzlALofCvhJ7y8kTqC9nEqqKpx/lz T+6Nj3Mq8gHuzRafHX6Z03zgc65GwRSGHxNlRatya/+4Ub6LveLYtGrBr7vxleOkAJ HpwFtTd7CD3IA== X-Mailer: boring 1.0 Received-SPF: pass client-ip=65.21.251.117; envelope-from=trof@n90.eu; helo=mx.n90.eu X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Mailman-Approved-At: Wed, 25 Oct 2023 08:52:17 -0400 X-BeenThere: tramp-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: tramp-devel-bounces+get-tramp-devel=m.gmane-mx.org@gnu.org Original-Sender: tramp-devel-bounces+get-tramp-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.tramp:10579 gmane.emacs.bugs:273166 Archived-At: --=-=-= Content-Type: text/plain 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 --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=0001-Let-processes-read-nothing-from-stdin-in-tramp.patch >From c4397c3261b9188262a1adee278075893410fb60 Mon Sep 17 00:00:00 2001 From: Aleksander Trofimowicz 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 --=-=-=--