ruby-changes:52570
From: normal <ko1@a...>
Date: Wed, 19 Sep 2018 17:23:29 +0900 (JST)
Subject: [ruby-changes:52570] normal:r64782 (trunk): process.c (waitpid_cleanup): unconditionally remove from waiters
normal 2018-09-19 17:23:19 +0900 (Wed, 19 Sep 2018) New Revision: 64782 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=64782 Log: process.c (waitpid_cleanup): unconditionally remove from waiters This is the safer option, as there seems to be cases where checking waitpid_state.ret is insufficient in ensure. I'm not 100% sure why this is, but this change was required for my work-in-progress Thread::Light patch series, too... Modified files: trunk/process.c Index: process.c =================================================================== --- process.c (revision 64781) +++ process.c (revision 64782) @@ -1106,7 +1106,11 @@ waitpid_cleanup(VALUE x) https://github.com/ruby/ruby/blob/trunk/process.c#L1106 { struct waitpid_state *w = (struct waitpid_state *)x; - if (w->ret == 0) { + /* + * XXX w->ret is sometimes set but list_del is still needed, here, + * Not sure why, so we unconditionally do list_del here: + */ + if (TRUE || w->ret == 0) { rb_vm_t *vm = rb_ec_vm_ptr(w->ec); rb_native_mutex_lock(&vm->waitpid_lock); -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/