summaryrefslogtreecommitdiff
path: root/io.c
diff options
context:
space:
mode:
authorakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-06-12 11:34:51 +0000
committerakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-06-12 11:34:51 +0000
commit37a1355bf8d9f055661381b6dda41135776940cf (patch)
treea0bbe6762da62a50eb27400367043beb3a2f1083 /io.c
parent0284e64922bae06a58bdc659022079729425117b (diff)
* include/ruby/intern.h (rb_exec_arg_init): deprecated.
(rb_exec_arg_addopt): ditto. (rb_exec_arg_fixup): ditto. (rb_run_exec_options): ditto. (rb_run_exec_options_err): ditto. * internal.h (rb_execarg_init): declared. (rb_execarg_addopt): ditto. (rb_execarg_fixup): ditto. (rb_execarg_run_options): ditto. * process.c: call rb_execarg_addopt, rb_execarg_fixup, rb_execarg_run_options, rb_execarg_init. (rb_execarg_addopt): renamed from rb_exec_arg_addopt. (rb_exec_arg_addopt): stub to call rb_execarg_addopt. (rb_execarg_init): renamed from rb_exec_arg_init. (rb_exec_arg_init): stub to call rb_execarg_init. (rb_execarg_fixup): renamed from rb_exec_arg_fixup. (rb_exec_arg_fixup): stub to call rb_execarg_fixup. (rb_execarg_run_options): renamed from rb_run_exec_options_err. (rb_run_exec_options_err): stub to call rb_execarg_run_options. (rb_run_exec_options): call rb_execarg_run_options. * io.c: call rb_execarg_addopt, rb_execarg_fixup, rb_execarg_run_options, rb_execarg_init. * ext/pty/pty.c (establishShell): call rb_execarg_init and rb_execarg_fixup. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36039 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'io.c')
-rw-r--r--io.c36
1 files changed, 18 insertions, 18 deletions
diff --git a/io.c b/io.c
index 5b1a6fcccd..a475495677 100644
--- a/io.c
+++ b/io.c
@@ -5517,27 +5517,27 @@ pipe_open(struct rb_exec_arg *eargp, const char *modestr, int fmode, convconfig_
rb_sys_fail_str(prog);
}
if (eargp) {
- rb_exec_arg_addopt(eargp, INT2FIX(0), INT2FIX(arg.write_pair[0]));
- rb_exec_arg_addopt(eargp, INT2FIX(1), INT2FIX(arg.pair[1]));
+ rb_execarg_addopt(eargp, INT2FIX(0), INT2FIX(arg.write_pair[0]));
+ rb_execarg_addopt(eargp, INT2FIX(1), INT2FIX(arg.pair[1]));
}
break;
case FMODE_READABLE:
if (rb_pipe(arg.pair) < 0)
rb_sys_fail_str(prog);
if (eargp)
- rb_exec_arg_addopt(eargp, INT2FIX(1), INT2FIX(arg.pair[1]));
+ rb_execarg_addopt(eargp, INT2FIX(1), INT2FIX(arg.pair[1]));
break;
case FMODE_WRITABLE:
if (rb_pipe(arg.pair) < 0)
rb_sys_fail_str(prog);
if (eargp)
- rb_exec_arg_addopt(eargp, INT2FIX(0), INT2FIX(arg.pair[0]));
+ rb_execarg_addopt(eargp, INT2FIX(0), INT2FIX(arg.pair[0]));
break;
default:
rb_sys_fail_str(prog);
}
if (eargp) {
- rb_exec_arg_fixup(arg.execp);
+ rb_execarg_fixup(arg.execp);
pid = rb_fork_async_signal_safe(&status, popen_exec, &arg, arg.execp->redirect_fds, errmsg, sizeof(errmsg));
}
else {
@@ -5595,28 +5595,28 @@ pipe_open(struct rb_exec_arg *eargp, const char *modestr, int fmode, convconfig_
rb_sys_fail_str(prog);
}
if (eargp) {
- rb_exec_arg_addopt(eargp, INT2FIX(0), INT2FIX(write_pair[0]));
- rb_exec_arg_addopt(eargp, INT2FIX(1), INT2FIX(pair[1]));
+ rb_execarg_addopt(eargp, INT2FIX(0), INT2FIX(write_pair[0]));
+ rb_execarg_addopt(eargp, INT2FIX(1), INT2FIX(pair[1]));
}
break;
case FMODE_READABLE:
if (rb_pipe(pair) < 0)
rb_sys_fail_str(prog);
if (eargp)
- rb_exec_arg_addopt(eargp, INT2FIX(1), INT2FIX(pair[1]));
+ rb_execarg_addopt(eargp, INT2FIX(1), INT2FIX(pair[1]));
break;
case FMODE_WRITABLE:
if (rb_pipe(pair) < 0)
rb_sys_fail_str(prog);
if (eargp)
- rb_exec_arg_addopt(eargp, INT2FIX(0), INT2FIX(pair[0]));
+ rb_execarg_addopt(eargp, INT2FIX(0), INT2FIX(pair[0]));
break;
default:
rb_sys_fail_str(prog);
}
if (eargp) {
- rb_exec_arg_fixup(eargp);
- rb_run_exec_options(eargp, &sarg);
+ rb_execarg_fixup(eargp);
+ rb_execarg_run_options(eargp, &sarg, NULL, 0);
}
while ((pid = (args ?
rb_w32_aspawn(P_NOWAIT, cmd, args) :
@@ -5633,7 +5633,7 @@ pipe_open(struct rb_exec_arg *eargp, const char *modestr, int fmode, convconfig_
{
int e = errno;
if (eargp)
- rb_run_exec_options(&sarg, NULL);
+ rb_execarg_run_options(&sarg, NULL, NULL, 0);
close(pair[0]);
close(pair[1]);
if ((fmode & (FMODE_READABLE|FMODE_WRITABLE)) == (FMODE_READABLE|FMODE_WRITABLE)) {
@@ -5650,7 +5650,7 @@ pipe_open(struct rb_exec_arg *eargp, const char *modestr, int fmode, convconfig_
RB_GC_GUARD(argbuf);
if (eargp)
- rb_run_exec_options(&sarg, NULL);
+ rb_execarg_run_options(&sarg, NULL, NULL, 0);
if ((fmode & FMODE_READABLE) && (fmode & FMODE_WRITABLE)) {
close(pair[1]);
fd = pair[0];
@@ -5671,12 +5671,12 @@ pipe_open(struct rb_exec_arg *eargp, const char *modestr, int fmode, convconfig_
cmd = StringValueCStr(prog);
}
if (eargp) {
- rb_exec_arg_fixup(eargp);
- rb_run_exec_options(eargp, &sarg);
+ rb_execarg_fixup(eargp);
+ rb_execarg_run_options(eargp, &sarg, NULL, 0);
}
fp = popen(cmd, modestr);
if (eargp)
- rb_run_exec_options(&sarg, NULL);
+ rb_execarg_run_options(&sarg, NULL, NULL, 0);
if (!fp) rb_sys_fail_path(prog);
fd = fileno(fp);
#endif
@@ -5727,7 +5727,7 @@ static VALUE
pipe_open_v(int argc, VALUE *argv, const char *modestr, int fmode, convconfig_t *convconfig)
{
struct rb_exec_arg earg;
- rb_exec_arg_init(argc, argv, FALSE, &earg);
+ rb_execarg_init(argc, argv, FALSE, &earg);
return pipe_open(&earg, modestr, fmode, convconfig);
}
@@ -5747,7 +5747,7 @@ pipe_open_s(VALUE prog, const char *modestr, int fmode, convconfig_t *convconfig
return pipe_open(NULL, modestr, fmode, convconfig);
}
- rb_exec_arg_init(argc, argv, TRUE, &earg);
+ rb_execarg_init(argc, argv, TRUE, &earg);
return pipe_open(&earg, modestr, fmode, convconfig);
}