From: Vincent Pit Date: Wed, 11 Nov 2015 14:49:46 +0000 (-0200) Subject: Avoid eval STRING wherever possible X-Git-Tag: v1.16~12 X-Git-Url: http://git.vpit.fr/?a=commitdiff_plain;h=2c6dde5f6603362e3f4bccc9994bf823e8bb06f1;p=perl%2Fmodules%2FTest-Valgrind.git Avoid eval STRING wherever possible --- diff --git a/lib/Test/Valgrind/Session.pm b/lib/Test/Valgrind/Session.pm index 3b377fb..51fd0bd 100644 --- a/lib/Test/Valgrind/Session.pm +++ b/lib/Test/Valgrind/Session.pm @@ -314,7 +314,10 @@ sub _run { $self->_croak("fork(): $!") unless defined $pid; if ($pid == 0) { - eval 'setpgrp 0, 0'; + { + local $@; + eval { setpgrp(0, 0) }; + } close $vrdr or $self->_croak("close(\$vrdr): $!"); fcntl $vwtr, Fcntl::F_SETFD(), 0 or $self->_croak("fcntl(\$vwtr, F_SETFD, 0): $!");