I'd also like to know how this is going to work with read -e and readline,
since those don't seem to know anything about the timer.
OK, that is a good point. I completely forgot about `read -e'. I took
a look at `rl_getc (stream)' (lib/readline/input.c). If one wants to
switch to this approach, the timeout needs to be specified for the
pselect(2) calls in `rl_getc ()'. In that case, I think readline could
provide a proper public interface to accept the setting of the
timeout. Because readline might be linked with different versions of
Bash, the handling of SIGALRM in readline can be left as is, but the
new interface for the timeout can be just added?