> How about raising an exception from your C code and catching it in > your Ruby code? Thank you vor this advice. But I didn't find a working solution with this construct of ruby, so maybe I nee a little bit hand help. The Code exits with an unknown software exception if rb_raise is called inside the thread function. Inside the startReceiver function it works. what is my mistake? Thanks Asterix i extend the c- receiver- function with this line: //////////////////////////////////////////////////////// // c code rb_raise(rb_eRuntimeError, "MsgReceived"); //////////////////////////////////////////////////////// // and inside of ruby I call the c- startReceiver- function in a begin rescue block started = false begin RubyDriver::startReceiver(recvThread, recvArray) if !started started = true rescue puts "Signaled from C" retry end -- Posted via http://www.ruby-forum.com/.