- or download this
#!/usr/bin/perl
# stopafter - run a command with a timeout
...
alarm($time);
exec @ARGV;
die "Couldn't exec @ARGV: $!; aborting";
- or download this
stopafter 300 command arg arg...
- or download this
open FH, "stopafter 10 command |" or die ...;