Next Unix Command Internals 25

Signal Handling

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


Next Copyright © 2002 M. J. Dominus