in reply to Re: Timeouts when reading from socket Filehandles?
in thread Timeouts when reading from socket Filehandles?

It might be smarter to save the old signal value outside the eval, and restore it after the eval. Yes, setting it local works fine. I totally agree with that much.

If the eval crashes on any code between your alarm 10 and alarm 0, the eval breaks. Granted, you have code to check for errors, but if people don't check, you can get some really bizzare errors on things such as cgi's with apache.

I saw code that never hit the alarm 0 'cause the eval died (no, not die()) on a particular line, and bailed on the eval, causing processing to die randomly due to the alarm never being reset :)

  • Comment on Re: Re: Timeouts when reading from socket Filehandles?