Compile this, link it with ruby lib, execute with a small
ruby program like this one :

    puts "Hello World from main Ruby Thread"

And explain why there is a core dump !

-- jc


#include <ruby.h>
#include <unistd.h>

static VALUE request_thread (void * data)
{
   while (1) {
    printf ("thread begin\n");
    sleep(1);
    printf("Thread end\n");
    rb_thread_schedule();
  }
   return Qtrue;
}

int main (int argc, char * argv[])
{ 
   ruby_init();
   ruby_options(argc, argv);
   rb_thread_create (request_thread, NULL);

   ruby_run();

   return 0;
}