Next Unix Command Internals 29

Signal Handling

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


Next Copyright © 2003 M. J. Dominus