summaryrefslogtreecommitdiff
path: root/thread.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-09-08 14:09:30 (GMT)
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-09-08 14:09:30 (GMT)
commitf3f10297f04b0461285a1b8ebd0d9f3d617fb974 (patch)
treec3567046c0c8b8ebb5b998f428c56b8aaea787e0 /thread.c
parent88d96a4fa9388e5228bb515a766c0bb697142415 (diff)
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
Diffstat (limited to 'thread.c')
-rw-r--r--thread.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/thread.c b/thread.c
index e92208e..1d8ea96 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: