all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Dmitry Gutov <dgutov@yandex.ru>
To: help-gnu-emacs <help-gnu-emacs@gnu.org>
Subject: accept-process-output with nil PROCESS argument doesn't exit early
Date: Tue, 13 Feb 2018 13:24:58 +0300	[thread overview]
Message-ID: <f8101a72-7581-f00b-cda3-cfdbee0fefb5@yandex.ru> (raw)

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	other threads:[~2018-02-13 10:24 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=f8101a72-7581-f00b-cda3-cfdbee0fefb5@yandex.ru \
    --to=dgutov@yandex.ru \
    --cc=help-gnu-emacs@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.