#!/usr/bin/perl -w local $SIG {ALRM} = sub {die "alarm"}; eval { alarm (2); system "$vmdiscover --server esx3-1.erp.ufl.edu --managedentity ho +st --entityname esx3-1.erp.ufl.edu "; alarm (0); }; if ($@ && $@ =~ /^alarm/) { print "Command has timed out"; }
In reply to Kill a command launched within script by ceweldon
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |