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

Thank you for your code, it behaves as you expected (print out "timeout\n" and hang). But it does not exactly solve the problem. When I tried earlier on mine, it does not even print out "timeout\n" equivalent :(.
  • Comment on Re^4: Cannot catch ALRM signal for timeout

Replies are listed 'Best First'.
Re^5: Cannot catch ALRM signal for timeout
by Fox (Pilgrim) on Dec 08, 2009 at 13:54 UTC
    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.