summaryrefslogtreecommitdiff
path: root/process.c
diff options
context:
space:
mode:
authornaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-09-09 15:17:15 +0000
committernaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-09-09 15:17:15 +0000
commitaa8dd0290b20fa9db9b545b8a1670ff3371c2e4b (patch)
treed925ec84f6e385faf965e0311041c9b941f90d84 /process.c
parent7198053a49d39a5c80551fc9147b9c0ab21e75a2 (diff)
* process.c: exec() requires to be single threaded also on Haiku.
by Takashi Toyoshima <toyoshim@gmail.com> https://github.com/ruby/ruby/pull/178 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36940 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'process.c')
-rw-r--r--process.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/process.c b/process.c
index e0bb84a4d2..270ee769c9 100644
--- a/process.c
+++ b/process.c
@@ -1017,6 +1017,8 @@ 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]
+ * This is also true on Haiku. It returns Errno::EPERM against exec()
+ * in multiple threads.
*/
rb_thread_stop_timer_thread(0);
}
@@ -2307,7 +2309,7 @@ rb_f_exec(int argc, VALUE *argv)
rb_execarg_fixup(execarg_obj);
fail_str = eargp->use_shell ? eargp->invoke.sh.shell_script : eargp->invoke.cmd.command_name;
-#ifdef __APPLE__
+#if defined(__APPLE__) || defined(__HAIKU__)
rb_exec_without_timer_thread(eargp, errmsg, sizeof(errmsg));
#else
rb_exec_async_signal_safe(eargp, errmsg, sizeof(errmsg));