diff options
author | ngoto <ngoto@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2015-07-10 11:27:43 +0000 |
---|---|---|
committer | ngoto <ngoto@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2015-07-10 11:27:43 +0000 |
commit | 929337db51e1c936856834e0632a76a899464e13 (patch) | |
tree | a5c39718c3dfb256617862ee86ea02b8b293b2b5 | |
parent | 5698e1bee42e8be06aa74a98c73a42566fe17807 (diff) | |
download | ruby-929337db51e1c936856834e0632a76a899464e13.tar.gz |
* process.c (rb_f_exec): rb_exec_without_timer_thread should be
used on every OS, not only on Mac OS X or Haiku, to prevent
timer thread communications using file descriptor 3 after
setting redirection of the fd 3 before calling exec.
[Bug #11336] [ruby-core:69886]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51209 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r-- | ChangeLog | 8 | ||||
-rw-r--r-- | process.c | 10 |
2 files changed, 8 insertions, 10 deletions
@@ -1,3 +1,11 @@ +Fri Jul 10 20:13:05 2015 Naohisa Goto <ngotogenome@gmail.com> + + * process.c (rb_f_exec): rb_exec_without_timer_thread should be + used on every OS, not only on Mac OS X or Haiku, to prevent + timer thread communications using file descriptor 3 after + setting redirection of the fd 3 before calling exec. + [Bug #11336] [ruby-core:69886] + Fri Jul 10 17:41:54 2015 Nobuyoshi Nakada <nobu@ruby-lang.org> * dir.c (is_case_sensitive): get attributes by the file descriptor @@ -2473,9 +2473,7 @@ rb_execarg_parent_end(VALUE execarg_obj) RB_GC_GUARD(execarg_obj); } -#if defined(__APPLE__) || defined(__HAIKU__) static int rb_exec_without_timer_thread(const struct rb_execarg *eargp, char *errmsg, size_t errmsg_buflen); -#endif /* * call-seq: @@ -2563,13 +2561,7 @@ rb_f_exec(int argc, const VALUE *argv) rb_execarg_parent_start(execarg_obj); fail_str = eargp->use_shell ? eargp->invoke.sh.shell_script : eargp->invoke.cmd.command_name; -#if defined(__APPLE__) || defined(__HAIKU__) rb_exec_without_timer_thread(eargp, errmsg, sizeof(errmsg)); -#else - before_exec_async_signal_safe(); /* async-signal-safe */ - rb_exec_async_signal_safe(eargp, errmsg, sizeof(errmsg)); - preserving_errno(after_exec_async_signal_safe()); /* async-signal-safe */ -#endif RB_GC_GUARD(execarg_obj); if (errmsg[0]) rb_sys_fail(errmsg); @@ -3077,7 +3069,6 @@ failure: return -1; } -#if defined(__APPLE__) || defined(__HAIKU__) static int rb_exec_without_timer_thread(const struct rb_execarg *eargp, char *errmsg, size_t errmsg_buflen) { @@ -3087,7 +3078,6 @@ rb_exec_without_timer_thread(const struct rb_execarg *eargp, char *errmsg, size_ preserving_errno(after_exec()); /* not async-signal-safe because it calls rb_thread_start_timer_thread. */ return ret; } -#endif #ifdef HAVE_WORKING_FORK /* This function should be async-signal-safe. Hopefully it is. */ |