diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2016-05-20 15:36:34 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2016-05-20 15:36:34 +0000 |
commit | aa107497cd379b713eba8cecdb9a882bb1e0dd89 (patch) | |
tree | 2bb39d9e87512d5937e85b47fee89ae285f85240 /io.c | |
parent | cbde995b2f271396689573d7306df185b86f9b6a (diff) | |
download | ruby-aa107497cd379b713eba8cecdb9a882bb1e0dd89.tar.gz |
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.c | 11 |
1 files changed, 3 insertions, 8 deletions
@@ -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); |