1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

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

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47443 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
akr 2014-09-07 03:47:47 +00:00
parent a179d0d242
commit e6368921ea
2 changed files with 8 additions and 0 deletions

View file

@ -1,3 +1,7 @@
Sun Sep 7 12:47:06 2014 Tanaka Akira <akr@fsij.org>
* process.c: PTHREAD_CANCEL_DISABLE is not defined on Android.
Sat Sep 6 20:59:06 2014 Tanaka Akira <akr@fsij.org>
* process.c (has_privilege): The gid zero is not a privilege.

View file

@ -3403,11 +3403,13 @@ disable_child_handler_before_fork(struct child_handler_disabler_state *old)
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 child_handler_disabler_state *old)
{
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) {