16 rb_require("RubyProcess.rb");
17 oProcess = rb_funcall3(rb_const_get(rb_cObject, rb_intern("RbProcess")), rb_intern("new"), 0, 0);
22 VALUE getID(VALUE current)
27 return rb_funcall(current,rb_intern("getID"),0);
32 VALUE isAlive(VALUE current)
37 return rb_funcall(current,rb_intern("alive?"),0);
42 void List(VALUE current)
45 rb_funcall(current,rb_intern("processList"),0);
50 int main(int argc, char ** argv)
57 VALUE test = isAlive(oProcess);
59 if (TYPE(test) == T_TRUE)
69 /*VALUE current = rb_thread_current(); // main One
70 test = isAlive(current);
72 if(TYPE(test) == T_TRUE)
73 printf("The Current Thread is Alive\n");*/
77 /*application_handler_on_start_document();
78 application_handler_on_end_document();
79 application_handler_on_begin_process();
80 application_handler_property();
81 application_handler_on_process_arg();
83 application_handler_on_end_process();
89 // compile command : gcc -I/usr/lib/ruby/1.8/i486-linux essai2.c -o essai2 -lruby1.8
91 // gcc -o libProcess.so -I/usr/lib/ruby/1.8/i486-linux -lruby1.8 -lsimgrid -shared rb_msg_process.c