mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
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
This commit is contained in:
parent
e70e46a1be
commit
330e39d568
1 changed files with 4 additions and 0 deletions
4
io.c
4
io.c
|
@ -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) {
|
||||
|
|
Loading…
Reference in a new issue