[前][次][番号順一覧][スレッド一覧]

ruby-changes:32646

From: naruse <ko1@a...>
Date: Tue, 28 Jan 2014 15:29:59 +0900 (JST)
Subject: [ruby-changes:32646] naruse:r44725 (trunk): * thread_pthread.c: rlimit is only available on Linux.

naruse	2014-01-28 15:29:51 +0900 (Tue, 28 Jan 2014)

  New Revision: 44725

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=44725

  Log:
    * thread_pthread.c: rlimit is only available on Linux.
      At least r44712 breaks FreeBSD.
      [ruby-core:60113] [Bug #9454]

  Modified files:
    trunk/ChangeLog
    trunk/thread_pthread.c
Index: ChangeLog
===================================================================
--- ChangeLog	(revision 44724)
+++ ChangeLog	(revision 44725)
@@ -1,3 +1,9 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1
+Tue Jan 28 15:27:36 2014  NARUSE, Yui  <naruse@r...>
+
+	* thread_pthread.c: rlimit is only available on Linux.
+	  At least r44712 breaks FreeBSD.
+	  [ruby-core:60113] [Bug #9454]
+
 Tue Jan 28 15:17:59 2014  Zachary Scott  <e@z...>
 
 	* lib/set.rb: [DOC] Add examples for Set#intersect? and Set#disjoint?
Index: thread_pthread.c
===================================================================
--- thread_pthread.c	(revision 44724)
+++ thread_pthread.c	(revision 44725)
@@ -1562,7 +1562,7 @@ ruby_stack_overflowed_p(const rb_thread_ https://github.com/ruby/ruby/blob/trunk/thread_pthread.c#L1562
 
     if (th) {
 	size = th->machine.stack_maxsize;
-#if defined(HAVE_GETRLIMIT) && MAINSTACKADDR_AVAILABLE
+#if defined(HAVE_GETRLIMIT) && defined(__linux__) && MAINSTACKADDR_AVAILABLE
 	if (pthread_equal(th->thread_id, native_main_thread.id)) {
 	    struct rlimit rlim;
 	    if (getrlimit(RLIMIT_STACK, &rlim) == 0 && rlim.rlim_cur > size) {

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]