Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

accept-process-output with nil PROCESS argument doesn't exit early

0 views
Skip to first unread message

Dmitry Gutov

unread,
Feb 13, 2018, 5:25:18 AM2/13/18
to help-gnu-emacs
According to the docstring, I'd expect this expression to finish in 1
second and return t:

(progn
(start-process-shell-command "sleep" "*sleep-command*"
"sleep 1; echo abc")
(accept-process-output nil 2 nil))

But it takes 2 seconds instead and returns nil.

This one, with the process explicitly passed in, behaves like expected:

(progn
(start-process-shell-command "sleep" "*sleep-command*"
"sleep 1; echo abc")
(accept-process-output (get-buffer-process "*sleep-command*") 2))

Any idea what I'm doing wrong in the first example?

0 new messages