Application shut down

Jan Lessner jan@c-lab.de
Tue, 19 Aug 1997 13:28:29 +0200


Hello
I'd like to write a client application which causes a server to shut
down. For this purpose, the server has a function like this:

	long stop(in long force);

The function is supposed to return a value differing from 0 if force is
not set and the server is busy. Otherwise it should shut down, returning
0 as a commitment.
My question now is how to implement this functionality in the server. If
I just call exit in the server code, the stop function doesn't properly
return at all. I thought I could just check for this case by catching
CORBA::COMM_FAILURE exceptions, but this isn't the case. In fact on
client side the function returns a non-zero value (25, but this is
probably just unspecified) so that I can't tell the propper shutdown
from a rejection.
Does anybody have a solution for that?

Regards,

	Jan Lessner, C-LAB