From: "Iñaki Baz Castillo" Date: 2012-05-30T02:52:58+09:00 Subject: [C exten] Is it possible to avoid longjmp in exceptions, Thread#kill, exit(), signals? Hi, my Ruby C extension runs a C loop (libuv) without GVL. At some point if an exception, Thread#kill, exit or a non trapped signal occurs, Ruby executes longjmp and leaves my C loop in an inconsisten status (i.e. while it was executing an internal libvu C iteration or whatever). My Ruby code does an "ensure" and so, but in some corner cases I cannot reuse the existing C loop, nor I can free its resources at C level. My question is: is there any way to avoid the longjmp? or a different approach: is there any way from my C code to avoid being interrupted while I go to Ruby land (by acquiring the GVL)? Thanks a lot. -- Iñaki Baz Castillo