From: Vincent Pit Date: Sun, 28 Sep 2008 10:26:29 +0000 (+0200) Subject: die() instead of croak() on system errors X-Git-Tag: v0.07~8 X-Git-Url: http://git.vpit.fr/?a=commitdiff_plain;h=c528f9cdb0a0b8f10658b8ed733d81e500de49c3;p=perl%2Fmodules%2FTest-Valgrind.git die() instead of croak() on system errors --- diff --git a/lib/Test/Valgrind.pm b/lib/Test/Valgrind.pm index f50edd6..a676ad0 100644 --- a/lib/Test/Valgrind.pm +++ b/lib/Test/Valgrind.pm @@ -151,14 +151,14 @@ sub import { return; } } - pipe my $rdr, my $wtr or croak "pipe(\$rdr, \$wtr): $!"; + pipe my $rdr, my $wtr or die "pipe(\$rdr, \$wtr): $!"; my $pid = fork; if (!defined $pid) { - croak "fork(): $!"; + die "fork(): $!"; } elsif ($pid == 0) { - setpgrp 0, 0 or croak "setpgrp(0, 0): $!"; - close $rdr or croak "close(\$rdr): $!"; - fcntl $wtr, F_SETFD, 0 or croak "fcntl(\$wtr, F_SETFD, 0): $!"; + setpgrp 0, 0 or die "setpgrp(0, 0): $!"; + close $rdr or die "close(\$rdr): $!"; + fcntl $wtr, F_SETFD, 0 or die "fcntl(\$wtr, F_SETFD, 0): $!"; my @args = ( '--tool=memcheck', '--leak-check=full', @@ -183,7 +183,7 @@ sub import { local $ENV{PERL_DL_NONLAZY} = 1; exec $vg, @args; } - close $wtr or croak "close(\$wtr): $!"; + close $wtr or die "close(\$wtr): $!"; local $SIG{INT} = sub { kill -(SIGTERM) => $pid }; $Test->plan(tests => 5) unless $args{no_test} or defined $Test->has_plan; my @tests = (