summaryrefslogtreecommitdiff
path: root/process.c
diff options
context:
space:
mode:
authorakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-12-03 12:33:37 +0000
committerakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-12-03 12:33:37 +0000
commitca209c80e9ab2911793a8d348514698c3124214b (patch)
treec70306a9a8d2aaa282d4c082429a1b3f594269a5 /process.c
parente98e384be0f0f0b82302b0dc4e0e1f65d1d63470 (diff)
* process.c (check_exec_redirect): accept :in, :out, :err as redirect
target. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20467 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'process.c')
-rw-r--r--process.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/process.c b/process.c
index 517b4867b1..35829da5cc 100644
--- a/process.c
+++ b/process.c
@@ -1259,6 +1259,18 @@ check_exec_redirect(VALUE key, VALUE val, VALUE options)
index = EXEC_OPTION_CLOSE;
param = Qnil;
}
+ else if (id == rb_intern("in")) {
+ index = EXEC_OPTION_DUP2;
+ param = INT2FIX(0);
+ }
+ else if (id == rb_intern("out")) {
+ index = EXEC_OPTION_DUP2;
+ param = INT2FIX(1);
+ }
+ else if (id == rb_intern("err")) {
+ index = EXEC_OPTION_DUP2;
+ param = INT2FIX(2);
+ }
else {
rb_raise(rb_eArgError, "wrong exec redirect symbol: %s",
rb_id2name(id));