This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Fix the new exit() tests, by Gisle Aas :
authorRafael Garcia-Suarez <rgarciasuarez@gmail.com>
Thu, 19 May 2005 21:07:43 +0000 (21:07 +0000)
committerRafael Garcia-Suarez <rgarciasuarez@gmail.com>
Thu, 19 May 2005 21:07:43 +0000 (21:07 +0000)
don't let the shell interfere with the process return value

p4raw-id: //depot/perl@24506

t/run/exit.t

index 9cc16ad..1ceee16 100644 (file)
@@ -14,8 +14,7 @@ my $quote = $^O =~ /^(VMS|MSWin\d+)$/ ? q{"} : q{'};
 # Run some code, return its wait status.
 sub run {
     my($code) = shift;
 # Run some code, return its wait status.
 sub run {
     my($code) = shift;
-    my $cmd = "$^X -e ";
-    return system($cmd.$quote.$code.$quote);
+    return system($^X, "-e", $code);
 }
 
 BEGIN {
 }
 
 BEGIN {