aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorkosaki <kosaki@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-12-25 05:31:04 +0000
committerkosaki <kosaki@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-12-25 05:31:04 +0000
commit402402741dccdda8d52e548cc9dc89b806d852f9 (patch)
treef6ce9fda52fc43de795d9ecc1a8d369d28e06fe4
parent522c538e93cfdb55ea2848d1029f5bca99e403da (diff)
downloadruby-402402741dccdda8d52e548cc9dc89b806d852f9.tar.gz
* 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
-rw-r--r--ChangeLog6
-rw-r--r--ext/pty/pty.c2
2 files changed, 8 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index 970a90e74d..e9a31f29d6 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+Sat Dec 25 15:08:08 2010 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
+
+ * ext/pty/pty.c (chfunc): Added rb_thread_atfork_before_exec().
+ We must reinitialize GVL at new process creation. Otherwise
+ we may meet an insane deadlock. [Bug#4121][ruby-dev:42686]
+
Sat Dec 25 14:27:09 2010 Nobuyoshi Nakada <nobu@ruby-lang.org>
* io.c (rb_io_extract_encoding_option): accept Encoding object as
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
*/