-#!/usr/local/bin/perl
+#!/usr/bin/perl
# Copyright (c) 2014 IndexData ApS. http://indexdata.com
#
# bomb.pl - wrapper to stop a process after N seconds
GetOptions(
"help" => \$help,
"debug=i" => \$debug,
- "timeout=i" => \$timeout,
+ "timeout=f" => \$timeout,
) or die usage;
my @system = @ARGV;
set_alarm( $timeout, join( " ", @system ) );
system(@system) == 0
- or die "system @system failed: $?";
+ or die "@system failed with exit code: $?\n";
exit(0);