From 402402741dccdda8d52e548cc9dc89b806d852f9 Mon Sep 17 00:00:00 2001 From: kosaki Date: Sat, 25 Dec 2010 05:31:04 +0000 Subject: * ext/pty/pty.c (chfunc): Added rb_thread_atfork_before_exec(). We must reinitialize GVL when new process creation. Otherwise we may meet an insane deadlock. [Bug #4121][ruby-dev:42686] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30350 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ext/pty/pty.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'ext/pty/pty.c') diff --git a/ext/pty/pty.c b/ext/pty/pty.c index b2b5caa2af..76543dbaec 100644 --- a/ext/pty/pty.c +++ b/ext/pty/pty.c @@ -156,6 +156,8 @@ chfunc(void *data, char *errbuf, size_t errbuf_len) return -1; \ } while (0) + rb_thread_atfork_before_exec(); + /* * Set free from process group and controlling terminal */ -- cgit v1.2.3