sub checkfile { my $file = shift; my $duration = shift || 10; my $pid = fork(); unless ($pid) { # this is run from child die "cannot access $file\n" unless -e $file; } else { # this is run from parent sleep $duration; if ( kill 0, $pid) { warn "$pid still running after $duration seconds!"; kill 9, $pid; return; } return 1 } }
In reply to Re: perl and slow NFS
by wazoox
in thread perl and slow NFS
by tmalyib
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |