If you have a signal handler set up, and it gets
called while Expect::expect() is inside of select(),
select() will return -1. But, you don't ever catch
this. You go on reading as if you got a positive number.
You should loop around your call to select, possibly
modifying the $time_left, to continue select()ing after
an interrupt has been processed. Ideally, you should
probably look at errno if select() returns -1, and do
different things based on if it's really EINTR, or some
other error condition.
I whacked up a minor patch to 1.07, but it's old, and
simplistic, so I won't include it. I presume it is a
simple enough problem that you can devise your own