From 59ba2bf0b676c288491b334c49886d6ba04b7dd3 Mon Sep 17 00:00:00 2001 From: akr Date: Mon, 28 Apr 2008 00:11:46 +0000 Subject: * include/ruby/intern.h (rb_exec_arg_init): declared. (rb_exec_arg_addopt): delared. (rb_exec_arg_fix): declared. (rb_exec_initarg): removed. (rb_exec_getargs): removed. (rb_exec_initarg2): removed. * io.c (struct popen_arg): make execarg as a pointer. (popen_exec): follow popen_arg change. (pipe_open): add eargp argument. extract argc and argv from eargp. use rb_exec_arg_addopt to add redirect options. (pipe_open_v): set up struct rb_exec_arg. (pipe_open_s): set up struct rb_exec_arg. * process.c (rb_exec_arg_addopt): new function extracted from check_exec_options_i. (check_exec_options_i): use rb_exec_arg_addopt. (rb_check_exec_options): opthash is always a hash now. (rb_exec_getargs): make it static. (rb_exec_fillarg): renamed from rb_exec_initarg2. don't set up redirect_fds. (rb_exec_arg_init): new function. (rb_exec_arg_fix): new function. (rb_f_exec): use rb_exec_arg_init and rb_exec_arg_fix. use rb_exec_arg_addopt to set close_others option. (run_exec_options): make close_others by default. (rb_spawn_internal): use rb_exec_arg_init and rb_exec_arg_fix. use rb_exec_arg_addopt to set close_others option. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16222 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- include/ruby/intern.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'include') diff --git a/include/ruby/intern.h b/include/ruby/intern.h index 4df92419b4..9938bb8ec3 100644 --- a/include/ruby/intern.h +++ b/include/ruby/intern.h @@ -453,9 +453,9 @@ struct rb_exec_arg { }; int rb_proc_exec_n(int, VALUE*, const char*); int rb_proc_exec(const char*); -VALUE rb_exec_initarg(int argc, VALUE *argv, int accept_shell, struct rb_exec_arg *e); -VALUE rb_exec_getargs(int *argc_p, VALUE **argv_p, int accept_shell, VALUE *env_ret, VALUE *opthash_ret); -void rb_exec_initarg2(VALUE prog, int argc, VALUE *argv, VALUE env, VALUE opthash, struct rb_exec_arg *e); +VALUE rb_exec_arg_init(int argc, VALUE *argv, int accept_shell, struct rb_exec_arg *e); +int rb_exec_arg_addopt(struct rb_exec_arg *e, VALUE key, VALUE val); +void rb_exec_arg_fix(struct rb_exec_arg *e); int rb_exec(const struct rb_exec_arg*); rb_pid_t rb_fork(int*, int (*)(void*), void*, VALUE); VALUE rb_f_exec(int,VALUE*); -- cgit v1.2.3