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

ruby-changes:35361

From: akr <ko1@a...>
Date: Sun, 7 Sep 2014 12:48:00 +0900 (JST)
Subject: [ruby-changes:35361] akr:r47443 (trunk): * process.c: PTHREAD_CANCEL_DISABLE is not defined on Android.

akr	2014-09-07 12:47:47 +0900 (Sun, 07 Sep 2014)

  New Revision: 47443

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

  Log:
    * process.c: PTHREAD_CANCEL_DISABLE is not defined on Android.

  Modified files:
    trunk/ChangeLog
    trunk/process.c
Index: ChangeLog
===================================================================
--- ChangeLog	(revision 47442)
+++ ChangeLog	(revision 47443)
@@ -1,3 +1,7 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1
+Sun Sep  7 12:47:06 2014  Tanaka Akira  <akr@f...>
+
+	* process.c: PTHREAD_CANCEL_DISABLE is not defined on Android.
+
 Sat Sep  6 20:59:06 2014  Tanaka Akira  <akr@f...>
 
 	* process.c (has_privilege): The gid zero is not a privilege.
Index: process.c
===================================================================
--- process.c	(revision 47442)
+++ process.c	(revision 47443)
@@ -3403,11 +3403,13 @@ disable_child_handler_before_fork(struct https://github.com/ruby/ruby/blob/trunk/process.c#L3403
         rb_sys_fail("pthread_sigmask");
     }
 
+#ifdef PTHREAD_CANCEL_DISABLE
     ret = pthread_setcancelstate(PTHREAD_CANCEL_DISABLE, &old->cancelstate);
     if (ret != 0) {
         errno = ret;
         rb_sys_fail("pthread_setcancelstate");
     }
+#endif
 }
 
 static void
@@ -3415,11 +3417,13 @@ disable_child_handler_fork_parent(struct https://github.com/ruby/ruby/blob/trunk/process.c#L3417
 {
     int ret;
 
+#ifdef PTHREAD_CANCEL_DISABLE
     ret = pthread_setcancelstate(old->cancelstate, NULL);
     if (ret != 0) {
         errno = ret;
         rb_sys_fail("pthread_setcancelstate");
     }
+#endif
 
     ret = pthread_sigmask(SIG_SETMASK, &old->sigmask, NULL); /* not async-signal-safe */
     if (ret != 0) {

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

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