* process.c (rb_f_exec): call rb_exec_async_signal_safe except on

Mac OS X.  cf. the comment in before_exec_non_async_signal_safe.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36009 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
akr 2012-06-10 03:46:09 +00:00
Родитель c27edd4a6e
Коммит c39fd4c340
2 изменённых файлов: 10 добавлений и 1 удалений

Просмотреть файл

@ -1,3 +1,8 @@
Sun Jun 10 12:43:23 2012 Tanaka Akira <akr@fsij.org>
* process.c (rb_f_exec): call rb_exec_async_signal_safe except on
Mac OS X. cf. the comment in before_exec_non_async_signal_safe.
Sun Jun 10 12:15:18 2012 Tanaka Akira <akr@fsij.org>
* io.c (popen_exec): don't call rb_thread_atfork_before_exec. use

Просмотреть файл

@ -1014,7 +1014,7 @@ static void before_exec_non_async_signal_safe(void)
/*
* On Mac OS X 10.5.x (Leopard) or earlier, exec() may return ENOTSUPP
* if the process have multiple threads. Therefore we have to kill
* internal threads temporary. [ruby-core: 10583]
* internal threads temporary. [ruby-core:10583]
*/
rb_thread_stop_timer_thread(0);
}
@ -2028,7 +2028,11 @@ rb_f_exec(int argc, VALUE *argv)
rb_exec_arg_prepare(&earg, argc, argv);
#ifdef __MacOS_X__
rb_exec_err(&earg, errmsg, sizeof(errmsg));
#else
rb_exec_async_signal_safe(&earg, errmsg, sizeof(errmsg));
#endif
if (errmsg[0])
rb_sys_fail(errmsg);
rb_sys_fail_str(earg.use_shell ? earg.invoke.sh.shell_script : earg.invoke.cmd.command_name);