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

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

bug#1082: 23.0.60; read-char unexpectedly halts execution of script


From: Lennart Borgman (gmail)
Subject: bug#1082: 23.0.60; read-char unexpectedly halts execution of script
Date: Mon, 06 Oct 2008 21:34:45 +0200
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.9) Gecko/20071031 Thunderbird/2.0.0.9 Mnenhy/0.7.5.666

Chong Yidong wrote:
>> Let filter.el consist of the forms:
>>
>>    (defun bc-filter (proc string)
>>      (message "%s" string))
>>
>>    (message "starting")
>>    (setq bc (start-process "bc" nil "/usr/bin/bc"))
>>    (set-process-filter bc 'bc-filter)
>>
>>    (while t
>>      (let ((char (read-char nil nil 0.1)))
>>        (message "char: %s" char)))
>>
>> Where "/usr/bin/bc" is the GNU arbitrary precision calculator. Now:
>>
>>    mt-computer:~ mt$ emacs --script filter.el
>>    starting
>>    mt-computer:~ mt$
>>
>> I expect non-termination in this case, as in eval-buffer on filter.el.
> 
> This broke when SYNC_INPUT became the default; it works when Emacs is
> recompiled without SYNC_INPUT, like Emacs 22.
> 
> I don't know what the specific cause of failure is, however.  Maybe the
> SYNC_INPUT code should only be active when Emacs is run interactively.
> 
> Thoughts?


What is the while loop supposed to do? I tested just that and I got a
bit weird results.






reply via email to

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