in reply to Re^2: alarm and reading from file decriptor
in thread alarm and reading from file decriptor

For the benefit of future students with this problem, I have discovered the answer myself.

It seems $/ was getting clobbered by the alarm somehow?

If $/ is saved aside somewhere and restored before each new read, everything is fine again.

  • Comment on Re^3: alarm and reading from file decriptor