diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2014-09-07 01:10:43 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2014-09-07 01:10:43 +0000 |
commit | e81a0d8f36d4245cf10fa5f47c980b96014fa0ae (patch) | |
tree | 59736128c050e5cd3ae734f5696a3b4c85299d45 /process.c | |
parent | 11a8187bd16061f097396b0165c32dfc11297a7d (diff) |
process.c: vfork may not work with pthread
* process.c (retry_fork_async_signal_safe): vfork may not work
with pthread always even if fork works with it.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47439 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'process.c')
-rw-r--r-- | process.c | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -3281,6 +3281,7 @@ recv_child_error(int fd, int *errp, char *errmsg, size_t errmsg_buflen) return size != 0; } +#if defined(HAVE_WORKING_VFORK) && !defined(CANNOT_VFORK_WITH_PTHREAD) #if !defined(HAVE_GETRESUID) && defined(HAVE_GETUIDX) /* AIX 7.1 */ static int @@ -3378,6 +3379,7 @@ has_privilege(void) return 0; } +#endif struct child_handler_disabler_state { @@ -3489,7 +3491,7 @@ retry_fork_async_signal_safe(int *status, int *ep, while (1) { prefork(); disable_child_handler_before_fork(&old); -#ifdef HAVE_WORKING_VFORK +#if defined(HAVE_WORKING_VFORK) && !defined(CANNOT_VFORK_WITH_PTHREAD) if (!has_privilege()) pid = vfork(); else |