"Matthew Tice" schreef:
> eval {
> local $SIG{ALRM} = sub {die "alarm\n"};
> alarm 2;
> $test = `ls @ARGV[0]`;
> alarm 0;
> };
>
> if ($@) {
> die unless $@ eq "alarm\n";
> # Timed out - error
> exit 1;
> } else {
> # Okay
> exit 0;
> }
eval {
local $SIG{ALRM} = sub {die
Matthew Tice wrote:
I've setup a simple (well, I copied it from someone else and modified it) to
monitor stale NFS mounts. Some preliminary testing seemed to go okay but
this problem crept up on me this weekend. The script is as follows:
#!/usr/bin/perl
use warnings;
use strict;
if (@ARGV
I've setup a simple (well, I copied it from someone else and modified it) to
monitor stale NFS mounts. Some preliminary testing seemed to go okay but
this problem crept up on me this weekend. The script is as follows:
#!/usr/bin/perl
if (@ARGV < 1) {
print "Usage:\n";
print "$0