Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Implement &run

Currently does not distinguish between a failure to launch a program
and a program that returns with a non-zero exit status. Seems that parrot
doesn't support that distinction :(

With some cleanups from moritz. Closes RT #114250.
  • Loading branch information...
commit 00932520b63b725235ef2de43f2c8c08c751e7f5 1 parent 4b54647
Konrad Borowski authored August 20, 2012 moritz committed August 20, 2012

Showing 1 changed file with 11 additions and 2 deletions. Show diff stats Hide diff stats

  1. 13  src/core/control.pm
13  src/core/control.pm
@@ -164,8 +164,17 @@ sub exit($status = 0) {
164 164
     $status;
165 165
 }
166 166
 
167  
-sub run(*@) {
168  
-    die 'run() is not yet implemented, please use shell() for now';
  167
+sub run(*@args ($, *@)) {
  168
+    my $error_code = nqp::p6box_i(
  169
+        pir::spawnw__IP(
  170
+            nqp::getattr(
  171
+                @args.eager,
  172
+                List,
  173
+                '$!items'
  174
+            )
  175
+        )
  176
+    )+> 8;
  177
+    $error_code but !$error_code;
169 178
 }
170 179
 
171 180
 sub shell($cmd) {

0 notes on commit 0093252

Please sign in to comment.
Something went wrong with that request. Please try again.