-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Hangs with no output when called from Emacs with make-process and pipe connection type #951
Copy link
Copy link
Closed
Labels
docAn issue with or an improvement to documentation.An issue with or an improvement to documentation.questionAn issue that is lacking clarity on one or more points.An issue that is lacking clarity on one or more points.
Description
What version of ripgrep are you using?
ripgrep 0.8.1 (rev c8e9f25)
-SIMD -AVX
How did you install ripgrep?
Debian package downloaded from link in readme.
What operating system are you using ripgrep on?
Ubuntu 14.04
Emacs 26.1
Describe your question, feature request, or bug.
rg does not seem to work properly with regard to pipes.
grep works:
(let ((default-directory "~/src/emacs/emacs"))
(setq argh (make-process :name "grep"
:command (list "rgrep" "TODO")
:connection-type 'pipe
:buffer (get-buffer-create "*grep*"))))
(with-current-buffer (process-buffer argh)
(length (buffer-string))) ;; => 114100
(process-status argh) ;; => exitrg does not:
(let ((default-directory "~/src/emacs/emacs"))
(setq argh (make-process :name "rg"
:command (list "rg" "TODO")
:connection-type 'pipe
:buffer (get-buffer-create "*rg*"))))
(with-current-buffer (process-buffer argh)
(length (buffer-string))) ;; => 0
(process-status argh) ;; => runThe process is still running:
$ pgrep -a rg
31513 /usr/bin/rg TODOHowever, if I use the pty type, it works:
(let ((default-directory "~/src/emacs/emacs"))
(setq argh (make-process :name "rg"
:command (list "rg"
"TODO")
:connection-type 'pty
:buffer (get-buffer-create "*rg*"))))
(with-current-buffer (process-buffer argh)
(length (buffer-string))) ;; => 96824
(process-status argh) ;; => exitag also seems to work correctly, like grep.
Thanks for your help.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
docAn issue with or an improvement to documentation.An issue with or an improvement to documentation.questionAn issue that is lacking clarity on one or more points.An issue that is lacking clarity on one or more points.