diff options
author | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2014-09-07 03:47:47 +0000 |
---|---|---|
committer | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2014-09-07 03:47:47 +0000 |
commit | e6368921eabf3874e8d6caab3d9af423768937d6 (patch) | |
tree | efae254ac2a053addc802cfaccfbe92bf3e08fe5 /process.c | |
parent | a179d0d242b7d7e06b42acec21a4c8a48b5fb241 (diff) |
* 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
Diffstat (limited to 'process.c')
-rw-r--r-- | process.c | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -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) { |