in reply to Re^4: Cannot catch ALRM signal for timeout
in thread Cannot catch ALRM signal for timeout

well another similar problem is that eof also waits for input(actually reads input), so you would have to also alarm on eof or try another approach like almut suggested.
  • Comment on Re^5: Cannot catch ALRM signal for timeout