all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* accept-process-output with nil PROCESS argument doesn't exit early
@ 2018-02-13 10:24 Dmitry Gutov
  0 siblings, 0 replies; only message in thread
From: Dmitry Gutov @ 2018-02-13 10:24 UTC (permalink / raw)
  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?



^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2018-02-13 10:24 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-02-13 10:24 accept-process-output with nil PROCESS argument doesn't exit early Dmitry Gutov

Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.