GNU bug report logs - #2930
23.0.92; `accept-process-output' and `sleep-for' do not run sentinels

Previous Next

Package: emacs;

Reported by: Markus Triska <markus.triska <at> gmx.at>

Date: Wed, 8 Apr 2009 18:40:05 UTC

Severity: normal

Done: Chong Yidong <cyd <at> stupidchicken.com>

Bug is archived. No further changes may be made.

Full log


Message #25 received at 2930 <at> emacsbugs.donarmstrong.com (full text, mbox):

From: Chong Yidong <cyd <at> stupidchicken.com>
To: Stefan Monnier  <monnier <at> iro.umontreal.ca>
Cc: Markus Triska <markus.triska <at> gmx.at>, 2930 <at> debbugs.gnu.org
Subject: Re: 23.0.92; `accept-process-output' and `sleep-for' do not run sentinels
Date: Sat, 15 Aug 2009 21:58:11 -0400
> The documentation for sentinels states:
>
>    A program can wait, so that sentinels will run, by calling
>    `sit-for' or `sleep-for' (...), or `accept-process-output' (...).
>
> However, when I do M-x eval-region RET on the following forms in
> "emacs -Q", then Emacs loops unexpectedly:
>
>    (defun my-sentinel (proc str)
>      (setq my-finished t))
>
>    (let ((p (start-process "bc" nil "bc"))
>          my-finished)
>      (set-process-sentinel p 'my-sentinel)
>      (process-send-string p "quit\n")
>      (while (not my-finished)
>        (accept-process-output nil 0.1)))

The trouble is that accept-process-output passes a zero DO_DISPLAY
argument to wait_reading_process_output (process.c:4306).  When
DO_DISPLAY is zero, status notifications are not performed
(process.c:4763).

Having accept-process-output pass a non-zero DO_DISPLAY argument to
wait_reading_process_output fixes this problem, but I don't know what
ramifications this would have.

Stefan, WDYT?



This bug report was last modified 15 years and 277 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.