From 142741b871da9e12e34de0250ba7e53441f92a3a Mon Sep 17 00:00:00 2001 From: akr Date: Sun, 11 May 2008 04:15:29 +0000 Subject: * thread.c (thread_cleanup_func_before_exec): extracted from thread_cleanup_func not to touch pthread data. pthread_cond_destroy in forked process may cause deadlock on Debian GNU/Linux Etch on x86, x86-64 and IA64. this doesn't cause resource leak because the process will exec soon. (terminate_atfork_before_exec_i): defined. (rb_thread_atfork_before_exec): defined. * include/ruby/intern.h (rb_thread_atfork_before_exec): declared. * process.c (rb_exec_atfork): call rb_thread_atfork_before_exec instead of rb_thread_atfork. * io.c (popen_exec): call rb_thread_atfork_before_exec instead of rb_thread_atfork. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@16355 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- process.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'process.c') diff --git a/process.c b/process.c index 58bd08b81..4607edeed 100644 --- a/process.c +++ b/process.c @@ -2103,7 +2103,7 @@ rb_exec(const struct rb_exec_arg *e) static int rb_exec_atfork(void* arg) { - rb_thread_atfork(); + rb_thread_atfork_before_exec(); return rb_exec(arg); } #endif -- cgit