From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Thomas Fitzsimmons Newsgroups: gmane.emacs.bugs Subject: bug#33050: 27.0.50; [macOS] Problem with process input with process-connection-type nil Date: Thu, 25 Oct 2018 21:41:34 -0400 Message-ID: References: <83a7n9udxv.fsf@gnu.org> <83ftwuq9ii.fsf@gnu.org> <83a7n2q6jb.fsf@gnu.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: blaine.gmane.org 1540517721 11403 195.159.176.226 (26 Oct 2018 01:35:21 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Fri, 26 Oct 2018 01:35:21 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) Cc: 33050@debbugs.gnu.org, Filipp Gunbin , alan@idiocy.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Oct 26 03:35:17 2018 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 1gFr1w-0002pY-SF for geb-bug-gnu-emacs@m.gmane.org; Fri, 26 Oct 2018 03:35:17 +0200 Original-Received: from localhost ([::1]:57611 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gFr42-0001WQ-RC for geb-bug-gnu-emacs@m.gmane.org; Thu, 25 Oct 2018 21:37:26 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:56965) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gFr3o-0001WK-7h for bug-gnu-emacs@gnu.org; Thu, 25 Oct 2018 21:37:14 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gFr3k-0004q0-3S for bug-gnu-emacs@gnu.org; Thu, 25 Oct 2018 21:37:11 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:38793) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gFr3e-0004gG-OG for bug-gnu-emacs@gnu.org; Thu, 25 Oct 2018 21:37:04 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1gFr3e-0007we-Cg for bug-gnu-emacs@gnu.org; Thu, 25 Oct 2018 21:37:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Thomas Fitzsimmons Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 26 Oct 2018 01:37:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 33050 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 33050-submit@debbugs.gnu.org id=B33050.154051781630528 (code B ref 33050); Fri, 26 Oct 2018 01:37:02 +0000 Original-Received: (at 33050) by debbugs.gnu.org; 26 Oct 2018 01:36:56 +0000 Original-Received: from localhost ([127.0.0.1]:43051 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gFr3Y-0007wK-0N for submit@debbugs.gnu.org; Thu, 25 Oct 2018 21:36:56 -0400 Original-Received: from mail-it1-f179.google.com ([209.85.166.179]:36252) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gFr3V-0007w8-4n for 33050@debbugs.gnu.org; Thu, 25 Oct 2018 21:36:54 -0400 Original-Received: by mail-it1-f179.google.com with SMTP id h14-v6so4259156itf.1 for <33050@debbugs.gnu.org>; Thu, 25 Oct 2018 18:36:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fitzsim-org.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-transfer-encoding; bh=odtpAEft2O9ePBMYqWrxaaQCQsnJkWeQ8/2nn4bh4Tw=; b=lXMQCLAABIQ75CVJ62b/1ct0X6pLsL0dxp8Ydfin0gapqnQZm7gyshUhXWd8VICPRz 3dV/shJix81jRh6o2gjlPO7hxqiRKFd09w1PjYFt8kz5Om2tbrglRVhbo3ytzeSz+iii kvkzGwPk/WMLdWAjI89oizk+Xd6/DESk+px+t/SDQej/ud+IX9V/EvG75K8ngZFsRONb FA3oZH16LDdQWJbRq9/INg2nHXP/cgJUFV+1VZLCPzcAjXhGfkK0H78cC2Llot1OLArW 3oiUy/2g1na1aCwEfjSkjN7zYpVvSyA4seAmlkl8B4sTtmZd22bOAKBZVU533U/SU2gH O0LQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version:content-transfer-encoding; bh=odtpAEft2O9ePBMYqWrxaaQCQsnJkWeQ8/2nn4bh4Tw=; b=qlVQFCjpOnfViEGi1lRQYg7cqDA+RPhQWGerA23KO07IITzG50DXbmmOWNFoH+tyia GCPTQBhjvxsuI5dHvMTqVaNu0ayLpNptdo1gXLonsHCwGn90qOoJsrOH+fu6AgA+d1ZJ USSSI6X+/wuLjqZIvtfCd+xwHkcoo+JcxLzK1UrtLuQKi+X9ThRBKeavmiCO0vm7kRKq LcTGkQyxKqWdng6BmGiAVyxkcLqUXhQKWMFGM/oH83+NbrqLVWAyP6aHWd1ohaKH1o7u 7qbHkfA9LbROLwn5Tqbtd4omvNk1OHp3FmP0SMBdUoy/paRveYPFzgG+gV6VmtKJMbF0 raYQ== X-Gm-Message-State: AGRZ1gIksCREDBr4S19nCM2GKdOJ9+GNSOcvlw18FneFvSqLw2f3D82L /aPSpgIQ1VMJfv/n7T+524R3iA== X-Google-Smtp-Source: AJdET5dSpgcb5pwHOEHv7vuMnpOZ95Oga+bZsrrqzc+S4CkrumTX9SiuQoFa0swAyWgg2VQ2kAhbnw== X-Received: by 2002:a05:660c:510:: with SMTP id d16mr2275415itk.109.1540517807505; Thu, 25 Oct 2018 18:36:47 -0700 (PDT) Original-Received: from localhost.localdomain (69-165-165-189.dsl.teksavvy.com. [69.165.165.189]) by smtp.gmail.com with ESMTPSA id p16-v6sm1373116itc.42.2018.10.25.18.36.45 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 25 Oct 2018 18:36:46 -0700 (PDT) In-Reply-To: <83a7n2q6jb.fsf@gnu.org> (Eli Zaretskii's message of "Thu, 25 Oct 2018 20:29:12 +0300") 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:151629 Archived-At: Hi Eli, Eli Zaretskii writes: >> From: Filipp Gunbin >> Cc: fitzsim@fitzsim.org, 33050@debbugs.gnu.org, alan@idiocy.org >> Date: Thu, 25 Oct 2018 20:10:06 +0300 >>=20 >> > I'm probably missing something: why are you still trying to find a >> > solution, when one was already found? What's wrong with setting >> > process-connection-type non-nil in this case, at least for Darwin? >>=20 >> Yes, setting p-c-t to t worked from the start, but it's just a >> workaround - there's still problem with p-c-t nil. >>=20 >> I'm currently running with this patch, which is based on Alan's fix in >> callproc.c (call_process() had the same problem on Darwin). > > I don't understand why: using nil process-connection-type for programs > that prompt the user is a bug anyway. I'm interested to know why you think this is a bug (or even not preferable) in the specific case of ldap.el. When ldap.el calls ldapsearch, ldapsearch doesn't prompt the user for the password directly. ldap.el (having pre-read the password into Elisp by various means) runs the command, and, in response to its prompt, sends it the password. I re-read the Elisp "Asynchronous Processes" node; when I was deciding how to set process-connection-type, I think I was following the _underlined_ part in: [...] If available, ptys are usually preferable for processes visible to the user, as in Shell mode, because they allow for job control (=E2=80=98C-c=E2=80=99, =E2=80=98C-z=E2=80=99, etc.) between the process= and its children, and because interactive programs treat ptys as terminal devices, whereas pipes don=E2=80=99t support these features. However, _for subprocesses = used by Lisp programs for internal purposes, it is often better to use a pipe_, because pipes are more efficient, and because they are immune to stray character injections that ptys introduce for large (around 500 byte) messages. Also, the total number of ptys is limited on many systems and it is good not to waste them. Given that ldapsearch can operate over a pipe (i.e., doesn't need terminal features, seems to be unaffected by buffering), and is used for internal purposes (i.e., is not visible to the user) isn't pipe mode preferable for the reasons given there? ldapsearch works for me on GNU/Linux either way, and I don't mind changing process-connection-type to t on the release branch to work around the Darwin behaviour. But if ldap.el's current setting of process-connection-type really is a flat out bug then the Elisp manual might need clarification or stronger language about when not to set it to "pipe mode". Thanks, Thomas