Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add &run() function #2838

Closed
p6rt opened this issue Jul 24, 2012 · 3 comments
Closed

Add &run() function #2838

p6rt opened this issue Jul 24, 2012 · 3 comments
Labels

Comments

@p6rt
Copy link

p6rt commented Jul 24, 2012

Migrated from rt.perl.org#114250 (status was 'resolved')

Searchable as RT114250$

@p6rt
Copy link
Author

p6rt commented Jul 24, 2012

From glitchmr@myopera.com

From 6cbb182b1faa5d3e0fbdaa5f2e7f9d2f37b86aa7 Mon Sep 17 00​:00​:00 2001
From​: GlitchMr <glitchmr@​myopera.com>
Date​: Tue, 24 Jul 2012 18​:26​:34 +0200
Subject​: [PATCH] Add &run() function


src/core/control.pm | 12 ++++++++++--
1 file changed, 10 insertions(+), 2 deletions(-)

Inline Patch
diff --git a/src/core/control.pm b/src/core/control.pm
index 60c9648..7007ae2 100644
--- a/src/core/control.pm
+++ b/src/core/control.pm
@@ -164,8 +164,16 @@ sub exit($status = 0) {
     $status;
 }
 
-sub run(*@) {
-    die 'run() is not yet implemented, please use shell() for now';
+sub run (*@args ($, *@)) {
+    my $error_code =
+        pir::spawnw__IP(
+            nqp::getattr(
+                @args.eager,
+                List,
+                '$!items'
+            )
+        ) +> 8;
+    $error_code but !$error_code;
 }
 
 sub shell($cmd) {
-- 
1.7.9.5

@p6rt
Copy link
Author

p6rt commented Sep 1, 2012

From @moritz

commited with some modifications as
00932520b63b725235ef2de43f2c8c08c751e7f5.

@p6rt
Copy link
Author

p6rt commented Sep 1, 2012

@moritz - Status changed from 'new' to 'resolved'

@p6rt p6rt closed this as completed Sep 1, 2012
@p6rt p6rt added the patch label Jan 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant