From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Barry Warsaw Newsgroups: gmane.emacs.bugs Subject: bug#28500: 25.3; shell mode starts echoing command Date: Tue, 19 Sep 2017 20:19:40 -0400 Message-ID: <5C993508-76A7-4A5D-A2B9-6146213B7935@python.org> References: <20959.1505783153@alto> <27B67310-AFA1-42A3-B0F4-70D567A837CE@python.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 (Mac OS X Mail 10.3 \(3273\)) Content-Type: multipart/signed; boundary="Apple-Mail=_BE2936E1-88CB-41F8-8F42-06AEB0C4403C"; protocol="application/pgp-signature"; micalg=pgp-sha256 X-Trace: blaine.gmane.org 1505866812 2693 195.159.176.226 (20 Sep 2017 00:20:12 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Wed, 20 Sep 2017 00:20:12 +0000 (UTC) Cc: 28500@debbugs.gnu.org, Mike Kupfer To: Andreas Schwab Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Sep 20 02:20:05 2017 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1duSkG-0000GM-9e for geb-bug-gnu-emacs@m.gmane.org; Wed, 20 Sep 2017 02:20:04 +0200 Original-Received: from localhost ([::1]:45976 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1duSkN-0000jr-Du for geb-bug-gnu-emacs@m.gmane.org; Tue, 19 Sep 2017 20:20:11 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:53871) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1duSkI-0000jd-0e for bug-gnu-emacs@gnu.org; Tue, 19 Sep 2017 20:20:07 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1duSkE-00068J-Ss for bug-gnu-emacs@gnu.org; Tue, 19 Sep 2017 20:20:05 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:40156) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1duSkE-00068A-Mx for bug-gnu-emacs@gnu.org; Tue, 19 Sep 2017 20:20:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1duSkE-0004Ir-GK for bug-gnu-emacs@gnu.org; Tue, 19 Sep 2017 20:20:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Barry Warsaw Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 20 Sep 2017 00:20:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 28500 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 28500-submit@debbugs.gnu.org id=B28500.150586678916519 (code B ref 28500); Wed, 20 Sep 2017 00:20:02 +0000 Original-Received: (at 28500) by debbugs.gnu.org; 20 Sep 2017 00:19:49 +0000 Original-Received: from localhost ([127.0.0.1]:48837 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1duSk1-0004IM-3X for submit@debbugs.gnu.org; Tue, 19 Sep 2017 20:19:49 -0400 Original-Received: from mail.wooz.org ([216.15.33.194]:59918) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1duSjz-0004I7-86 for 28500@debbugs.gnu.org; Tue, 19 Sep 2017 20:19:48 -0400 Original-Received: from localhost (localhost [127.0.0.1]) by mail.wooz.org (Postfix) with ESMTP id C8CCD140742; Tue, 19 Sep 2017 20:19:41 -0400 (EDT) X-Virus-Scanned: Debian amavisd-new at mail.wooz.org Original-Received: from mail.wooz.org ([127.0.0.1]) by localhost (mail.wooz.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 3quujMkmjcKM; Tue, 19 Sep 2017 20:19:41 -0400 (EDT) Original-Received: from resist.wooz.org (resist.wooz.org [192.168.11.57]) by mail.wooz.org (Postfix) with ESMTPSA id 590711401EB; Tue, 19 Sep 2017 20:19:41 -0400 (EDT) In-Reply-To: X-Mao-Original-Outgoing-Id: 527559580.54946-a7bd86c6ecbf30d9ed30b3acea3bb366 X-Mailer: Apple Mail (2.3273) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.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" Xref: news.gmane.org gmane.emacs.bugs:137156 Archived-At: --Apple-Mail=_BE2936E1-88CB-41F8-8F42-06AEB0C4403C Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 On Sep 19, 2017, at 09:36, Andreas Schwab wrote: >=20 > $ stty; openssl aes-256-cbc -in foo.txt -out foo.text.enc; stty What is happening is that -echo is getting lost. `stty -echo` after = exiting Python will restore normal behavior in a shell buffer. I=E2=80=99= m not entirely sure why, but this is neither set nor necessary in a = Terminal window. My suspicion now falls on readline from home-brew. Specifically, if I = build Python from git master but *remove* the readline..so file so = there=E2=80=99s no way that readline can be invoked, then I don=E2=80=99t = see the problem. readline gets imported implicitly if available when = entering the interactive prompt, and I=E2=80=99ve proven to myself that = if that happens, echo gets reenabled. It=E2=80=99s the common feature = with sqlite3 too, which for me comes from brew. Further, because = openssl comes from Apple, it isn=E2=80=99t linked with brew=E2=80=99s = readline and that does *not* exhibit the problem. And then I found this: https://github.com/Homebrew/brew/issues/651 I will follow up on that issue, but it=E2=80=99s clearly now not an = Emacs bug. FWIW, this little bit of Python in your $PYTHONSTARTUP file will = workaround the problem: import sys import atexit import termios # Reset `stty -echo` on exit. def no_echo(): flags =3D termios.tcgetattr(sys.stdin) flags[3] &=3D ~termios.ECHO termios.tcsetattr(sys.stdin, termios.TCSADRAIN, flags) atexit.register(no_echo) Cheers! --Apple-Mail=_BE2936E1-88CB-41F8-8F42-06AEB0C4403C Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEhBcVftvnPZ6sHlObEm61Y6dLBr8FAlnBtBwACgkQEm61Y6dL Br/5Uw/8D/+8JCbxk3wtOG1J4rpeBfqI0tMQc5XNTkUp7H6TczsDpEGE9tannwMJ 0b0rdHu/dKdMXKqSQTLb4L+gCwttR2bHaaBdSkZeoHPt3jVRHtfhtkIAFPwPXVJw AXOhTbSF8kaC5y7/hbbs229wvRRqIbKIWAxCWmlrjQ7ABmTpTKH+fp/dyPkcGEZV XAVgi0xBmg97JUjdjQI9wIPUUu7tqosdMO1GIXzjQPcdY3MQLM4TKmq7pGwEMp2Y hl1dmsqFIteQFt6jahyiM4OYNVZ6Xkphdr+8t7x/sK1dSRlff7HW/szuacn1zA8h J3aLwrxjOQWIwNybhpJWT9FkE40V5GdNskn2F2STOx9/KSyPKP9VQKD9I66N7fHw pkYDfmw6Fk9QiwrYCAw0rmEfQbrVRuavcbq2+fxi91Nw8saqgiVyJ00cZzy22ur7 3hK8T7MklLF65of8VtRYtzRLwva1ikN0+GwNsD0bNpqMQ6B4svL4Q2bNHktu+HX/ X44Iy8gg/6IZTK5nPotTJHPmsk0etprBqlf9fSEeMsSp0nbbBdiA0vRIX95zmHOo 4YHm84GjQh15NB5hKC7AOHJUZUxGmJDgqt0zNftEdz2ywGBwqu+UFbyQVisdiZW2 qhAnXxlnLFyBVTj/Vx8crWrNLBoY075UJkJAOE5FUgpJugrwG3c= =7ZWn -----END PGP SIGNATURE----- --Apple-Mail=_BE2936E1-88CB-41F8-8F42-06AEB0C4403C--