File: timers

package info (click to toggle)
libipc-run-perl 0.80-2
  • links: PTS, VCS
  • area: main
  • in suites: lenny
  • size: 452 kB
  • ctags: 186
  • sloc: perl: 5,317; makefile: 44
file content (12 lines) | stat: -rwxr-xr-x 215 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
#!/usr/local/lib/perl -w

use strict ;
use IPC::Run qw( :all ) ;

$IPC::Run::debug = 10 ;

alarm 5 ;
$SIG{ALRM} = sub { die "timeout never fired!" } ;

my $out ;
run [$^X, '-e', 'sleep 10'], ">", \$out, timeout 1 ;