[omniORB] How to do a timeout (with oO but independent of it)?

Pfeiffer Daniel Daniel.Pfeiffer@start.de
Fri Aug 30 16:33:01 2002


Hi,

I've got a case where our business logic dictates that if a certain method gets called, another one must also get called shortly afterwards.

So, on method entry, when I've got a timer running, I do

	alarm( 0 );

and at the end of the special method I do

	signal( SIGALRM, timeout_handler );
	alarm( 20 );

In a debugger (kdbg) I've had my timeout_handler get called, but when running normally it never does.  I'm also amazed at not seeing anything with strace -e signal when coming by this point (which I definitely come by).  I suppose this is at odds with threads or other signal handling in omniORB.

What is the omniORB compatible way of doing this?

I'm developing with 3.0.4, on Linux 2.4.18, but I need a system and version independent solution.

Thank you very much for any solution!
Daniel