Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

* process.c: exec() requires to be single threaded also on Haiku. #178

Closed
wants to merge 1 commit into from

2 participants

Takashi Toyoshima NARUSE, Yui
Takashi Toyoshima

No description provided.

NARUSE, Yui
Collaborator

Merged in rr36940, thanks!

Sandor Szücs szuecs referenced this pull request from a commit in szuecs/ruby
NARUSE, Yui nurse * process.c: exec() requires to be single threaded also on Haiku.
  by Takashi Toyoshima <toyoshim@gmail.com>
  ruby#178

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36940 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
aa8dd02
Aaron Patterson tenderlove referenced this pull request from a commit in tenderlove/ruby
NARUSE, Yui nurse * process.c: exec() requires to be single threaded also on Haiku.
  by Takashi Toyoshima <toyoshim@gmail.com>
  ruby#178

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36940 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2ad6114
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
This page is out of date. Refresh to see the latest.
Showing with 3 additions and 1 deletion.
  1. +3 1 process.c
4 process.c
View
@@ -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));
Something went wrong with that request. Please try again.