close $vrdr or die "close(\$vrdr): $!";
fcntl $vwtr, F_SETFD, 0 or die "fcntl(\$vwtr, F_SETFD, 0): $!";
my @args = (
+ $vg,
'--tool=memcheck',
'--leak-check=full',
'--leak-resolution=high',
print STDOUT "valgrind @args\n";
local $ENV{PERL_DESTRUCT_LEVEL} = 3;
local $ENV{PERL_DL_NONLAZY} = 1;
- exec $vg, @args;
+ exec { $args[0] } @args;
+ die "exec @args: $!";
}
local $SIG{INT} = sub { kill -(SIGTERM) => $pid };
$Test->plan(tests => 5) unless $args{no_test} or defined $Test->has_plan;