summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-06-03 08:29:48 +0000
committerakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-06-03 08:29:48 +0000
commitf4f28bf75f0aa534de3b1edcf46c8a6ee905e9af (patch)
treeee237344ea2755c25d3abbb9c064c954854cfe1e /include
parent694035eb35d7dc52ae58d8306cad2c2d6b0bf240 (diff)
* use execve() to preserve environment variables when exec method is
failed. [ruby-core:44093] [ruby-trunk - Bug #6249] * include/ruby/intern.h (rb_exec_arg): add envp_str and envp_buf field to store envp of execve(). * process.c (proc_exec_v): takes envp_str as an argument and use it for execve(). (rb_proc_exec_ne): extended version of rb_proc_exec_n(). (rb_proc_exec_n): use rb_proc_exec_ne(). (rb_proc_exec): follow proc_exec_v() change. (fill_envp_buf_i): new function. (rb_exec_arg_fixup): set up envp_str and envp_buf. (save_env_i): removed. (save_env): removed. (rb_run_exec_options_err): don't modify environment variables. (rb_exec_err): use rb_proc_exec_ne(). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35882 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'include')
-rw-r--r--include/ruby/intern.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/ruby/intern.h b/include/ruby/intern.h
index 61ed85fcdb..668d59a1fb 100644
--- a/include/ruby/intern.h
+++ b/include/ruby/intern.h
@@ -592,6 +592,8 @@ struct rb_exec_arg {
VALUE options;
VALUE redirect_fds;
VALUE progname;
+ VALUE envp_str;
+ VALUE envp_buf;
};
int rb_proc_exec_n(int, VALUE*, const char*);
int rb_proc_exec(const char*);