in reply to Re^5: DBI messes up sleep
in thread DBI messes up sleep

I didn't (even try to) reproduce it, and what I posted isn't a workaround. sleep should always be called in a loop to either handle or ignore signals.

Replies are listed 'Best First'.
Re^7: DBI messes up sleep
by eric256 (Parson) on Sep 17, 2007 at 20:09 UTC

    Hmm, just read http://perldoc.perl.org/functions/sleep.html and while it doesn't say excatly that, it does say that sleep doesn't neccessarily sleep the full length. It is certainly counter intuitive to me at least, if sleep for 30 i expect it to sleep for 30 seconds, guess i better change my expectations.


    ___________
    Eric Hodges
      "May be interrupted if the process receives a signal". Perhaps you could avoid the loop if you knew more (possibly system-specific) details. I'm working from that line and reports here on Perl Monks of signals interrupting sleep.