diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-01-15 14:07:17 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-01-15 14:07:17 +0000 |
commit | 330e39d5684d0b4f5b2565eaf6d991185be2ebf0 (patch) | |
tree | 8f78776324c510dae4316e407c21150a2c672799 | |
parent | e70e46a1be711b1bacee43b1922601cb2aa377e5 (diff) | |
download | ruby-330e39d5684d0b4f5b2565eaf6d991185be2ebf0.tar.gz |
io.c: no envp if no spawnve
* io.c (pipe_open): envp is not used if only spawnv is defined right
now.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38835 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r-- | io.c | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -5663,7 +5663,9 @@ pipe_open(VALUE execarg_obj, const char *modestr, int fmode, convconfig_t *convc # endif # if !defined(HAVE_FORK) char **args = NULL; +# if defined(HAVE_SPAWNVE) char **envp = NULL; +# endif # endif #endif #if !defined(HAVE_FORK) @@ -5731,7 +5733,9 @@ pipe_open(VALUE execarg_obj, const char *modestr, int fmode, convconfig_t *convc pid = rb_fork_async_signal_safe(&status, popen_exec, &arg, arg.eargp->redirect_fds, errmsg, sizeof(errmsg)); # else rb_execarg_run_options(eargp, sargp, NULL, 0); +# if defined(HAVE_SPAWNVE) if (eargp->envp_str) envp = (char **)RSTRING_PTR(eargp->envp_str); +# endif while ((pid = DO_SPAWN(cmd, args, envp)) == -1) { /* exec failed */ switch (e = errno) { |