summaryrefslogtreecommitdiff
path: root/io.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-05-20 15:36:34 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-05-20 15:36:34 +0000
commitaa107497cd379b713eba8cecdb9a882bb1e0dd89 (patch)
tree2bb39d9e87512d5937e85b47fee89ae285f85240 /io.c
parentcbde995b2f271396689573d7306df185b86f9b6a (diff)
fix build on no-fork-spawnv platforms
* process.c (rb_execarg_commandline): build command line string from argument vector in rb_execarg. [ruby-core:75611] [Bug #12398] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55091 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'io.c')
-rw-r--r--io.c11
1 files changed, 3 insertions, 8 deletions
diff --git a/io.c b/io.c
index 7e6ca89038..f4cc940865 100644
--- a/io.c
+++ b/io.c
@@ -5886,6 +5886,8 @@ rb_execarg_fixup_v(VALUE execarg_obj)
rb_execarg_parent_start(execarg_obj);
return Qnil;
}
+#else
+char *rb_execarg_commandline(const struct rb_execarg *eargp, VALUE *prog);
#endif
static VALUE
@@ -5933,10 +5935,6 @@ pipe_open(VALUE execarg_obj, const char *modestr, int fmode,
int write_fd = -1;
#if !defined(HAVE_WORKING_FORK)
const char *cmd = 0;
-#if !defined(HAVE_SPAWNV)
- int argc;
- VALUE *argv;
-#endif
if (prog)
cmd = StringValueCStr(prog);
@@ -6065,10 +6063,7 @@ pipe_open(VALUE execarg_obj, const char *modestr, int fmode,
fd = arg.pair[1];
}
#else
- if (argc) {
- prog = rb_ary_join(rb_ary_new4(argc, argv), rb_str_new2(" "));
- cmd = StringValueCStr(prog);
- }
+ cmd = rb_execarg_commandline(eargp, &prog);
if (!NIL_P(execarg_obj)) {
rb_execarg_parent_start(execarg_obj);
rb_execarg_run_options(eargp, sargp, NULL, 0);