From f3f10297f04b0461285a1b8ebd0d9f3d617fb974 Mon Sep 17 00:00:00 2001 From: nobu Date: Tue, 8 Sep 2015 14:09:30 +0000 Subject: io.c: no wait when killed * io.c (rb_io_s_popen): do not wait the child process during being killed. [ruby-core:70671] [Bug #11510] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51798 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- thread.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'thread.c') diff --git a/thread.c b/thread.c index e92208eedc..1d8ea96e03 100644 --- a/thread.c +++ b/thread.c @@ -2229,6 +2229,18 @@ rb_thread_kill(VALUE thread) return thread; } +int +rb_thread_to_be_killed(VALUE thread) +{ + rb_thread_t *th; + + GetThreadPtr(thread, th); + + if (th->to_kill || th->status == THREAD_KILLED) { + return TRUE; + } + return FALSE; +} /* * call-seq: -- cgit v1.2.3