emacs.exe -batch -Q -l sit-for-bug.el
This hangs after the displaying "calling (sit-for 1)". The first
(sit-for 0) does not hang.
(First off, it isn't hung: press enter, and the sit-for will exit.
The problem is that `read-event' can't be interrupted by the timer in
batch mode).
Anyway, the situation is a little more complicated than that, because
the old sit-for also doesn't work properly.
With the old sit-for, there is no way to interrupt in batch mode: no
matter what key you press, including enter, the sit-for will sit for
the entire duration.