diff options
Diffstat (limited to 'io.c')
-rw-r--r-- | io.c | 16 |
1 files changed, 8 insertions, 8 deletions
@@ -4489,7 +4489,7 @@ popen_exec(void *pp, char *errmsg, size_t errmsg_len) struct popen_arg *p = (struct popen_arg*)pp; rb_thread_atfork_before_exec(); - return rb_exec(p->execp, errmsg, errmsg_len); + return rb_exec_err(p->execp, errmsg, errmsg_len); } #endif @@ -4575,11 +4575,11 @@ pipe_open(struct rb_exec_arg *eargp, VALUE prog, const char *modestr, int fmode, } if (eargp) { rb_exec_arg_fixup(arg.execp); - pid = rb_fork(&status, popen_exec, &arg, arg.execp->redirect_fds, errmsg, sizeof(errmsg)); + pid = rb_fork_err(&status, popen_exec, &arg, arg.execp->redirect_fds, errmsg, sizeof(errmsg)); } else { fflush(stdin); /* is it really needed? */ - pid = rb_fork(&status, 0, 0, Qnil, NULL, 0); + pid = rb_fork(&status, 0, 0, Qnil); if (pid == 0) { /* child */ popen_redirect(&arg); rb_io_synchronized(RFILE(orig_stdout)->fptr); @@ -4663,7 +4663,7 @@ pipe_open(struct rb_exec_arg *eargp, VALUE prog, const char *modestr, int fmode, } if (eargp) { rb_exec_arg_fixup(eargp); - rb_run_exec_options(eargp, &sarg, NULL, 0); + rb_run_exec_options(eargp, &sarg); } while ((pid = (args ? rb_w32_aspawn(P_NOWAIT, 0, args) : @@ -4678,13 +4678,13 @@ pipe_open(struct rb_exec_arg *eargp, VALUE prog, const char *modestr, int fmode, break; default: if (eargp) - rb_run_exec_options(&sarg, NULL, NULL, 0); + rb_run_exec_options(&sarg, NULL); rb_sys_fail(cmd); break; } } if (eargp) - rb_run_exec_options(&sarg, NULL, NULL, 0); + rb_run_exec_options(&sarg, NULL); if ((fmode & FMODE_READABLE) && (fmode & FMODE_WRITABLE)) { close(pair[1]); fd = pair[0]; @@ -4706,11 +4706,11 @@ pipe_open(struct rb_exec_arg *eargp, VALUE prog, const char *modestr, int fmode, } if (eargp) { rb_exec_arg_fixup(eargp); - rb_run_exec_options(eargp, &sarg, NULL, 0); + rb_run_exec_options(eargp, &sarg); } fp = popen(cmd, modestr); if (eargp) - rb_run_exec_options(&sarg, NULL, NULL, 0); + rb_run_exec_options(&sarg, NULL); if (!fp) rb_sys_fail(RSTRING_PTR(prog)); fd = fileno(fp); #endif |