tmalyib has asked for the wisdom of the Perl Monks concerning the following question:
sub checkfile { my $file = shift; my $duration = shift || 10; eval { local $SIG{ALRM} = sub { die "file access to $file failed\n" }; alarm $duration; do { eval { die "cannot access $file\n" unless -e $file; }; sleep 1 if $@; } until !$@; alarm 0; }; return if $@; return 1 unless $@; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: perl and slow NFS
by wazoox (Prior) on Oct 18, 2007 at 14:40 UTC |