diff --git a/ChangeLog b/ChangeLog index 9dbd689e5f..9727e79679 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +Sun Jun 10 12:15:18 2012 Tanaka Akira + + * io.c (popen_exec): don't call rb_thread_atfork_before_exec. use + rb_exec_async_signal_safe instead of rb_exec_err. + (pipe_open): use rb_fork_async_signal_safe instead of rb_fork_err. + Sun Jun 10 11:44:57 2012 Tanaka Akira * process.c (rb_fork_internal): call after_fork only unless diff --git a/io.c b/io.c index c398530241..66b7093e0c 100644 --- a/io.c +++ b/io.c @@ -5461,8 +5461,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_err(p->execp, errmsg, errmsg_len); + return rb_exec_async_signal_safe(p->execp, errmsg, errmsg_len); } #endif @@ -5539,7 +5538,7 @@ pipe_open(struct rb_exec_arg *eargp, const char *modestr, int fmode, convconfig_ } if (eargp) { rb_exec_arg_fixup(arg.execp); - pid = rb_fork_err(&status, popen_exec, &arg, arg.execp->redirect_fds, errmsg, sizeof(errmsg)); + pid = rb_fork_async_signal_safe(&status, popen_exec, &arg, arg.execp->redirect_fds, errmsg, sizeof(errmsg)); } else { pid = rb_fork(&status, 0, 0, Qnil);