Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

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
GlitchMr authored moritz committed
Showing with 11 additions and 2 deletions.
  1. +11 −2 src/core/control.pm
View
13 src/core/control.pm
@@ -164,8 +164,17 @@ sub exit($status = 0) {
$status;
}
-sub run(*@) {
- die 'run() is not yet implemented, please use shell() for now';
+sub run(*@args ($, *@)) {
+ my $error_code = nqp::p6box_i(
+ pir::spawnw__IP(
+ nqp::getattr(
+ @args.eager,
+ List,
+ '$!items'
+ )
+ )
+ )+> 8;
+ $error_code but !$error_code;
}
sub shell($cmd) {
Please sign in to comment.
Something went wrong with that request. Please try again.