From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Sylvain Chouleur Newsgroups: gmane.emacs.bugs Subject: bug#16582: Bug: tramp shell command doesn't read stdin Date: Tue, 28 Jan 2014 23:40:06 +0100 Message-ID: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=001a113940cab4399304f10f8205 X-Trace: ger.gmane.org 1390949043 27471 80.91.229.3 (28 Jan 2014 22:44:03 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 28 Jan 2014 22:44:03 +0000 (UTC) To: 16582@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Jan 28 23:44:10 2014 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1W8HO5-0005Fu-Gz for geb-bug-gnu-emacs@m.gmane.org; Tue, 28 Jan 2014 23:44:09 +0100 Original-Received: from localhost ([::1]:39805 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W8HO4-0005JK-Q4 for geb-bug-gnu-emacs@m.gmane.org; Tue, 28 Jan 2014 17:44:08 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:57917) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W8HNz-0005J7-Q4 for bug-gnu-emacs@gnu.org; Tue, 28 Jan 2014 17:44:04 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1W8HNy-0001Ir-P5 for bug-gnu-emacs@gnu.org; Tue, 28 Jan 2014 17:44:03 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:53852) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W8HNy-0001In-LE for bug-gnu-emacs@gnu.org; Tue, 28 Jan 2014 17:44:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1W8HNy-0007j4-GC for bug-gnu-emacs@gnu.org; Tue, 28 Jan 2014 17:44:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Sylvain Chouleur Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 28 Jan 2014 22:44:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 16582 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.139094900729633 (code B ref -1); Tue, 28 Jan 2014 22:44:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 28 Jan 2014 22:43:27 +0000 Original-Received: from localhost ([127.0.0.1]:39638 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1W8HNO-0007hr-8e for submit@debbugs.gnu.org; Tue, 28 Jan 2014 17:43:26 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:55467) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1W8HKc-0007dK-0M for submit@debbugs.gnu.org; Tue, 28 Jan 2014 17:40:34 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1W8HKa-0000a2-Ak for submit@debbugs.gnu.org; Tue, 28 Jan 2014 17:40:33 -0500 Original-Received: from lists.gnu.org ([208.118.235.17]:55170) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W8HKa-0000Zc-1b for submit@debbugs.gnu.org; Tue, 28 Jan 2014 17:40:32 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:57176) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W8HKY-0004yl-EB for bug-gnu-emacs@gnu.org; Tue, 28 Jan 2014 17:40:31 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1W8HKX-0000TI-4a for bug-gnu-emacs@gnu.org; Tue, 28 Jan 2014 17:40:30 -0500 Original-Received: from mail-qa0-x22b.google.com ([2607:f8b0:400d:c00::22b]:39316) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W8HKW-0000MT-3d for bug-gnu-emacs@gnu.org; Tue, 28 Jan 2014 17:40:28 -0500 Original-Received: by mail-qa0-f43.google.com with SMTP id o15so1410123qap.16 for ; Tue, 28 Jan 2014 14:40:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:from:date:message-id:subject:to:content-type; bh=xqbLbVsVcQWWQ1oQqdftQ/qtViPY89XMMRwEzteCmvs=; b=R3asEOjD1WzrL0YDbPJkfsKyfp5gS3/hsDa/RfZbHVG0FjAjPw+bap+JH7FKZjGb2P p9TYtMNCcBw2mnzTIo3OQMtGSOxH5dxTvVWAUjQZbuRXXamFsXx7TH6cIjT0hViq0Atc F1DOIiBh8GIZQlWLDlkY4gCFtS1UN58/n5IxbBwvyxrFlSQIr1YDBJ5MO3QVEtAI8ccG qrWrwjwvwfCOSO6ne3gdE+7QYQSl+0DYnZGjbNl0SWaEeA9vpkVmeCVgW1ijD2B03YX5 TKm+uIYgCjQr/58U42eCUASp82F0jTX2DtZ/Lwd7XEG37Arki7u+dPE1zOcCR1wWQUC4 vgAw== X-Received: by 10.140.105.35 with SMTP id b32mr6498690qgf.36.1390948826493; Tue, 28 Jan 2014 14:40:26 -0800 (PST) Original-Received: by 10.96.63.134 with HTTP; Tue, 28 Jan 2014 14:40:06 -0800 (PST) X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Mailman-Approved-At: Tue, 28 Jan 2014 17:43:24 -0500 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:84196 Archived-At: --001a113940cab4399304f10f8205 Content-Type: text/plain; charset=ISO-8859-1 Hi, there is a regression introduced by this commit: e43048325611953396186b569447a3754422ddc3 Author: Michael Albinus Date: Fri Dec 6 16:34:06 2013 +0100 Bug#16045 * progmodes/compile.el (compilation-start): * progmodes/grep.el (rgrep): Revert change of 2012-12-20 (r111276). * net/tramp-sh.el (tramp-sh-handle-start-file-process): Handle long command lines, lasting from "sh -c ...". (Bug#16045) The following syntax used to execute tramp shell command: exec <
Hi,

there is a regression introduced by this commit:
=

<= div>e43048325611953396186b569447a3754422dd= c3
Author: Michael Albinu= s <michael.albinus@gmx.de&= gt;
Date: =A0 Fri Dec 6 16:34:06 2013 +01= 00

= =A0 =A0 Bug#16045
=A0 =A0=A0
=A0 =A0 * progmodes/compile.el (compi= lation-start):
=A0 =A0 * = progmodes/grep.el (rgrep): Revert change of 2012-12-20 (r111276).
=A0 =A0=A0
=A0 =A0 * net/tramp-sh.el (tramp-sh-handle-start-file-pr= ocess):
=A0 =A0 Handle lo= ng command lines, lasting from "sh -c ...". =A0(Bug#16045)=

=

=
The following sy= ntax used to execute tramp shell command:
exec <<EOF= /bin/bash
= commands
EO= F
prevents users t= o send inputs to bash using stdin.
For example, the following does not works anymore:<= /div>

exec <<EOF /bin/= bash
read l= ine;
echo $line;
EOF

I don't understand what was this problem of long command lines (Bug#160= 45): I've tried to execute shell comands with huge command lines and al= l were successfull.
To keep the approach of splitting the lines, I would suggest something like= that:
exec= /bin/bash -c "
commands
on=
multiple l= ines
"=

But this needs to back= slash all shell specific characters, and I don't know if there is reall= y benefit compared to the original solution (before <<EOF)

What do you think?

--=A0
Sylva= in

PS: I've a= lready posted on tramp-devel mailing list but it seems there is no activity= there.
--001a113940cab4399304f10f8205--