changeset 32593 | 3711565687a6 |
parent 32574 | 719426c9e1eb |
child 32594 | 3caf79c88aef |
32574:719426c9e1eb | 32593:3711565687a6 |
---|---|
1 use POSIX qw(setsid); |
|
2 |
|
3 $SIG{'INT'} = "DEFAULT"; |
|
4 |
|
5 defined (my $pid = fork) or die "$!"; |
|
6 if (not $pid) { |
|
7 POSIX::setsid or die $!; |
|
8 exec @ARGV; |
|
9 } |
|
10 else { |
|
11 wait; |
|
12 my ($user, $system, $cuser, $csystem) = times; |
|
13 my $time = ($user + $cuser) * 1000; |
|
14 print "$time\n"; |
|
15 } |