From 14a97fd48aad077f7e239a20dd30cad41c0f6d8f 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: svn+ssh://ci.ruby-lang.org/ruby/trunk@16355 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- io.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'io.c') diff --git a/io.c b/io.c index ad0b6ffda3..6bd0037d22 100644 --- a/io.c +++ b/io.c @@ -3671,7 +3671,7 @@ popen_exec(void *pp) { struct popen_arg *p = (struct popen_arg*)pp; - rb_thread_atfork(); + rb_thread_atfork_before_exec(); return rb_exec(p->execp); } #endif -- cgit v1.2.3