emacs-devel
[Top][All Lists]
Advanced

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

Re: 23.0.60; read-char unexpectedly halts execution of script


From: Andreas Schwab
Subject: Re: 23.0.60; read-char unexpectedly halts execution of script
Date: Mon, 06 Oct 2008 23:28:06 +0200
User-agent: Gnus/5.110009 (No Gnus v0.9) Emacs/22.2 (gnu/linux)

Chong Yidong <address@hidden> writes:

>> 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?

In non-interactive mode we always want restartable syscalls, since
keyboard input goes through stdio (SYNC_INPUT makes no difference here).
I've checked in a fix.

Andreas.

-- 
Andreas Schwab, SuSE Labs, address@hidden
SuSE Linux Products GmbH, Maxfeldstraße 5, 90409 Nürnberg, Germany
PGP key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."




reply via email to

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