#!/usr/bin/perl -w use strict; my $usage = "timeout \n"; my $timeout = shift || die $usage; alarm($timeout); exec @ARGV; die "exec failed: @ARGV";