Next System Programming in Perl 36

Signal Handling

        #!/usr/bin/perl
        my ($limit, $command, @args) = @ARGV;
        $SIG{ALARM} = 'DEFAULT';
        alarm $limit;
        exec $command, @args;
        die "Couldn't run '$command': $!";
        stopafter 30 command arg arg arg...


Next 36