From e81a0d8f36d4245cf10fa5f47c980b96014fa0ae Mon Sep 17 00:00:00 2001 From: nobu Date: Sun, 7 Sep 2014 01:10:43 +0000 Subject: 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 --- process.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'process.c') diff --git a/process.c b/process.c index c258e5e7fc..b5e9b38760 100644 --- a/process.c +++ b/process.c @@ -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 -- cgit v1.2.1