]> git.vpit.fr Git - perl/modules/Test-Valgrind.git/commitdiff
Avoid eval STRING wherever possible
authorVincent Pit <perl@profvince.com>
Wed, 11 Nov 2015 14:49:46 +0000 (12:49 -0200)
committerVincent Pit <perl@profvince.com>
Thu, 12 Nov 2015 15:13:34 +0000 (13:13 -0200)
lib/Test/Valgrind/Session.pm

index 3b377fb482d0d3f127cfd6f93b96086bfd89a267..51fd0bde779afdb0504aadb5a6c02b1ec521e1b1 100644 (file)
@@ -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): $!");