--- Begin Message ---
Subject: |
27.0.50; [macOS] Problem with process input with process-connection-type nil |
Date: |
Mon, 15 Oct 2018 22:03:19 +0300 |
I was investigating why eudc-ldap hangs, and stripped the problem to the
following (did this in emacs -Q):
(let ((buf (get-buffer-create "my-process-buf")))
(with-current-buffer buf
(erase-buffer)
(let* ((process-connection-type nil)
(proc (start-process "my-process" buf "/usr/bin/read" "-p" "enter
something:")))
(while (null (progn
(goto-char (point-min))
(re-search-forward "enter something:" (point-max) t)))
(accept-process-output proc 1)
(message "proc status: %s" (process-status proc)))
(message "found prompt")
(message "proc status: %s" (process-status proc))
(process-send-string proc "asdf")
(process-send-string proc "\n")
(while (not (memq (process-status proc) '(exit signal)))
(sit-for 0.1))
(message "exited"))))
If I let-bind process-connection-type to t (use pty) in above code, then
it works normally:
*Messages* :
proc status: run
found prompt
proc status: run
exited
"exited"
Buffer "my-process-buf":
enter something:
Process my-process<2> finished
But if I let-bind process-connection-type to nil (so does ldap.el), then
it hangs, and after a few seconds wait and C-g, *Messages* has only
this: "proc status: run [6 times]", and buffer my-process-buf is empty.
This is emacs master built with ./configure CC=/usr/bin/gcc --without-x
--without-sound --with-ns --with-file-notification=no --with-gnutls
--with-json --with-modules --with-threads --with-xml2 && make
Also tried --without-threads - same behavior.
Thanks.
In GNU Emacs 27.0.50 (build 1, x86_64-apple-darwin17.7.0, NS appkit-1561.60
Version 10.13.6 (Build 17G65))
of 2018-10-15 built on fgunbin.playteam.ru
Repository revision: 3d91dc1bb5aeecda786ebe1805c33d14c8bd89fa
System Description: Mac OS X 10.13.6
--- End Message ---
--- Begin Message ---
Subject: |
Re: bug#33050: 27.0.50; [macOS] Problem with process input with process-connection-type nil |
Date: |
Thu, 29 Nov 2018 17:09:20 +0300 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (darwin) |
On 29/11/2018 12:41 +0200, Eli Zaretskii wrote:
>> From: Filipp Gunbin <address@hidden>
>> Cc: address@hidden, address@hidden, address@hidden
>> Date: Thu, 29 Nov 2018 12:51:09 +0300
>>
>> > I guess I'm confused regarding what you'd like to see on emacs-26.
>> > Was there a patch to that effect posted in this discussion, and if so,
>> > could you point me to it, please?
>>
>> Sure, it's in message https://debbugs.gnu.org/cgi/bugreport.cgi?bug=33050#89
>
> Thanks, now pushed to the emacs-26 branch.
Ok, I pushed the unconditional setting on master and am closing this
bug.
Thanks.
--- End Message ---