Dariush Debian Diary

Diariusz Dariusza

, 09, 2004

Permanent URL Timeout....

val {
    local $SIG{ALRM} = sub { die "alarm timeout" };
    local $SIG{__DIE__} = sub { alarm 0; die @_ };
    alarm $timeout;
    # operation you're waiting on which might die()
    # in the grandparent post, this was 
    # $line=<$child>
    alarm 0;        # cancel the alarm
};
die $@ if $@ && $@ !~ /alarm timeout/;
if ($@) {
    # Whatever you want on an alarm timeout
}

( from perlmonks post by fizbin ):w

Last modified on

powered by blosxom  Creative Commons License

Copyright ©1995-2004 Dariush Pietrzak. All content on this website, unless otherwise noted, is licensed under a Creative Commons License.
Using desktop theme, version 0.5. Check the Blosxom site for the latest copy.

Calendar

September 2007
Sun Mon Tue Wed Thu Fri Sat
           
           

Archives

Categories

Subscribe

Subscribe to a syndicated feed of this weblog, brought to you by the power of RSS.

XML