unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#33050: 27.0.50; [macOS] Problem with process input with process-connection-type nil
@ 2018-10-15 19:03 Filipp Gunbin
  2018-10-20 10:09 ` Eli Zaretskii
  0 siblings, 1 reply; 52+ messages in thread
From: Filipp Gunbin @ 2018-10-15 19:03 UTC (permalink / raw)
  To: 33050

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





^ permalink raw reply	[flat|nested] 52+ messages in thread

end of thread, other threads:[~2018-12-22 15:05 UTC | newest]

Thread overview: 52+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-10-15 19:03 bug#33050: 27.0.50; [macOS] Problem with process input with process-connection-type nil Filipp Gunbin
2018-10-20 10:09 ` Eli Zaretskii
2018-10-22 15:35   ` Filipp Gunbin
2018-10-23  1:53     ` Thomas Fitzsimmons
2018-10-23 22:41       ` Filipp Gunbin
2018-10-24  1:55         ` Thomas Fitzsimmons
2018-10-24 13:13           ` Filipp Gunbin
2018-10-24 14:05           ` Filipp Gunbin
2018-10-24 16:20             ` Thomas Fitzsimmons
2018-10-24 19:33               ` Filipp Gunbin
2018-10-24 19:46               ` Filipp Gunbin
2018-10-24 22:07                 ` Thomas Fitzsimmons
2018-10-25 15:51                   ` Filipp Gunbin
2018-10-25 16:24                     ` Eli Zaretskii
2018-10-25 17:10                       ` Filipp Gunbin
2018-10-25 17:29                         ` Eli Zaretskii
2018-10-25 18:10                           ` Filipp Gunbin
2018-10-25 18:20                             ` Eli Zaretskii
2018-10-25 19:36                               ` Filipp Gunbin
2018-10-25 19:40                                 ` Eli Zaretskii
2018-10-25 20:47                                   ` Filipp Gunbin
2018-10-26  6:29                                     ` Eli Zaretskii
2018-10-26  1:41                           ` Thomas Fitzsimmons
2018-10-26  7:00                             ` Eli Zaretskii
2018-10-26 15:41                               ` Thomas Fitzsimmons
2018-10-26 17:20                                 ` Eli Zaretskii
2018-10-27 10:20                                   ` Eli Zaretskii
2018-10-27 13:42                                     ` Thomas Fitzsimmons
2018-10-27 14:53                                       ` Eli Zaretskii
2018-10-27 16:53                                         ` Thomas Fitzsimmons
2018-10-27 18:49                                           ` Eli Zaretskii
2018-10-26 23:12                                 ` Filipp Gunbin
2018-10-27  2:09                                   ` Thomas Fitzsimmons
2018-10-27 14:52                                     ` Filipp Gunbin
2018-10-30  0:49                                       ` Thomas Fitzsimmons
2018-10-30 19:11                                         ` Filipp Gunbin
2018-11-28 23:09                                     ` Filipp Gunbin
2018-11-29  7:21                                       ` Eli Zaretskii
2018-11-29  8:46                                         ` Filipp Gunbin
2018-11-29  9:19                                           ` Eli Zaretskii
2018-11-29  9:51                                             ` Filipp Gunbin
2018-11-29 10:41                                               ` Eli Zaretskii
2018-11-29 14:09                                                 ` Filipp Gunbin
2018-12-03 14:17                                                   ` Thomas Fitzsimmons
2018-12-04 12:37                                                     ` Filipp Gunbin
2018-12-22 15:05                                                       ` Thomas Fitzsimmons
2018-10-27  6:59                                   ` Eli Zaretskii
2018-10-27 14:37                                     ` Filipp Gunbin
2018-10-27 20:28                             ` Charles A. Roelli
2018-10-28 16:00                               ` Eli Zaretskii
2018-10-28 19:53                                 ` Charles A. Roelli
2018-10-25 16:41                     ` Filipp Gunbin

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).