help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


From: Dmitry Gutov
Subject: accept-process-output with nil PROCESS argument doesn't exit early
Date: Tue, 13 Feb 2018 13:24:58 +0300
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:58.0) Gecko/20100101 Thunderbird/58.0

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?



reply via email to

[Prev in Thread] Current Thread [Next in Thread]