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: Tue, 23 Oct 2018 21:55:13 -0400 Message-ID: References: <83a7n9udxv.fsf@gnu.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1540345769 20742 195.159.176.226 (24 Oct 2018 01:49:29 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Wed, 24 Oct 2018 01:49:29 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) Cc: 33050@debbugs.gnu.org To: Filipp Gunbin Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Oct 24 03:49:25 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 1gF8IU-0005DV-O6 for geb-bug-gnu-emacs@m.gmane.org; Wed, 24 Oct 2018 03:49:23 +0200 Original-Received: from localhost ([::1]:45169 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gF8Kb-0004Lw-CX for geb-bug-gnu-emacs@m.gmane.org; Tue, 23 Oct 2018 21:51:33 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:58558) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gF8KO-0004KH-Sa for bug-gnu-emacs@gnu.org; Tue, 23 Oct 2018 21:51:25 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gF8KA-0008AJ-0l for bug-gnu-emacs@gnu.org; Tue, 23 Oct 2018 21:51:14 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:34731) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gF8K6-00086N-G4 for bug-gnu-emacs@gnu.org; Tue, 23 Oct 2018 21:51:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1gF8K6-0007Pe-Cl for bug-gnu-emacs@gnu.org; Tue, 23 Oct 2018 21:51: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: Wed, 24 Oct 2018 01:51: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.154034585628483 (code B ref 33050); Wed, 24 Oct 2018 01:51:02 +0000 Original-Received: (at 33050) by debbugs.gnu.org; 24 Oct 2018 01:50:56 +0000 Original-Received: from localhost ([127.0.0.1]:38989 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gF8K0-0007PK-6V for submit@debbugs.gnu.org; Tue, 23 Oct 2018 21:50:56 -0400 Original-Received: from mail-it1-f169.google.com ([209.85.166.169]:39788) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gF8Jy-0007P5-DJ for 33050@debbugs.gnu.org; Tue, 23 Oct 2018 21:50:54 -0400 Original-Received: by mail-it1-f169.google.com with SMTP id m15so4627300itl.4 for <33050@debbugs.gnu.org>; Tue, 23 Oct 2018 18:50:54 -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; bh=97+mckE5UYRxu5oSJ8Ol12AAookrhxUBdyEprbpbUTE=; b=XMXgYhrVd0yidvY1Stl1xmKB3QyOiYG08vyV4ws2o9l+exQ/MOTZjQRd4T5bZGCpmE lsfiUHAce7QotxIeG4WzFnNqIYyq/YLyrdmJ4fI/4R3sQpZBKC3ZuG4ZbF2/XqkCH9SJ WEu6VQ5I3/U1ylP1Mj1FtTQ6nCebl0WOvBS5p5h0YwqSBD0FDfyXfURGTbYsL9fsc7og 1Shr7TtGgaX/k2xoK6ez+fGxEVjBi30zPdeiOQP8cuNezAwQTAC71JXrnNz0PI0U7B1L yVgp1Hp8oLYAZCS7ukXBaBJP24sOxeEHUbkPXXuQS16vqed1lc3QHnbdu3HI330YjYOU fizw== 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; bh=97+mckE5UYRxu5oSJ8Ol12AAookrhxUBdyEprbpbUTE=; b=QE0d/5wBaMixXri8FKfvo50Wq3Bqa/xJnNldbaeGd/eW5lobYnLGZMAIJ20s0iqBR2 1NrAdI/S63RYJllpNCZ3IWGNfp9BF549d0Ld9p3vpokPZy+QFbLMlPYavl9/7E8FpK+F K7h1uF3kbPqarmHyUrqsnB6pnkUNH+ejxT5CXyHSneGbzM5DvqdACaWmRTiJlRqCECmH czXg781CM3jzuzRcS626f6wzNHkZ7VVEJyaj15nJFWIRUbU06/v9MwiOyhHWcx0mXqU4 rrlX8XpzATyX+pAwPBn7l4fT2qUN2Sra2GsbyYtBLIk2vw/5/Vp5RGuJ2ZhkG+w0wf8b /Qpw== X-Gm-Message-State: AGRZ1gJIahKIHJlffr3oIDNg0alhXmOyDfbUOSPDjFMk8feHtlnN2iOG A5rapZNyJYu4Tqdo+m7hssRfUGi+8bc= X-Google-Smtp-Source: AJdET5f/Wcwsz0IR8OjGSMNkaG+9IHLe1lzLG/kRUbSpbq+imggoEdjqpftSK0USiHgR8k1LIx/dGA== X-Received: by 2002:a24:81c1:: with SMTP id q184-v6mr418155itd.152.1540345848415; Tue, 23 Oct 2018 18:50:48 -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-v6sm1280757itc.42.2018.10.23.18.50.47 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 23 Oct 2018 18:50:47 -0700 (PDT) In-Reply-To: (Filipp Gunbin's message of "Wed, 24 Oct 2018 01:41:50 +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:151539 Archived-At: Filipp Gunbin writes: > Thomas, > > On 22/10/2018 21:53 -0400, Thomas Fitzsimmons wrote: > [..] >> As for that specific line, I may have copied it from another part of >> Emacs that reads a password via a pipe; when I look now at other places >> that bind this variable to nil, I see comments like this one in >> lisp/gnus/nntp.el: >> >> ;; A non-nil connection type results in mightily odd behavior where >> ;; (process-send-string proc "\^M") ends up sending a "\n" to the >> ;; ssh process. --Stef >> ;; Also a nil connection allow ssh-askpass to work under X11. >> (let ((process-connection-type nil)) >> (apply 'start-process "nntpd" buffer command)) >> >> Today I tested my setup (x86_64 GNU/Linux, OpenLDAP ldapsearch 2.4.40) >> without setting process-connection-type to nil, and it still works. The >> documentation for that variable says that the fallback is to use a pipe >> if all ptys are busy in which case I guess this would still fail for >> you. >> >> Your test case behaves the same way for me on x86_64 GNU/Linux. > > Do you mean it fails, or it works ok (regardless of > process-connection-type value)? I meant its behaviour is the same for me on x86_64 GNU/Linux as what you described its behaviour to be on Mac OS. Without: (process-connection-type nil) the test case succeeds. With it, the test case hangs. However if I change the test case program from: "/usr/bin/read" "-p" "enter something:" to: "ldapsearch" "-W" it does not hang regardless of the process-connection-type setting. Because it is missing the other options, after reading the password ldapsearch just fails to contact the server, after which my-process-buf contains... ...without (process-connection-type nil)): Enter LDAP Password: ldap_sasl_interactive_bind_s: can't contact LDAP server (-1) Process my-process<4> exited abnormally with code 255 ...with (process-connection-type nil)): Enter LDAP Password: ldap_sasl_interactive_bind_s: can't contact LDAP server (-1) Process my-process<4> exited abnormally with code 255 The only difference seems to be the missing newline. I got the above results with both my system ldapsearch (2.4.40) and with ldapseach 2.4.28 which I built from source. Anyway, at least on my system, it seems that /usr/bin/read is not doing the same thing as ldapsearch -W to read the string. What happens when you try the test case with "ldapsearch" "-W"? >> Maybe our ldapsearch commands are behaving differently. What version of >> ldapsearch are you using? > > I have OpenLDAP 2.4.28. OK, I doubt the problem is related to OpenLDAP version differences, but if it's easy it might be worth trying a newer one. Thomas