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.

-- 
Iaki Baz Castillo
<ibc / aliax.net>