[omniORB] Unbinding objects

b.keeping@ic.ac.uk b.keeping@ic.ac.uk
Mon, 24 Jan 2000 12:29:25 GMT


Just use the standard signal mechanism - for instance, if you have
global variables (based on eg3 in examples/echo)

CosNaming::NamingContext_var testContext;
CosNaming::Name objectName;

and a routine as follows

void Exit(int status)
{
  testContext->unbind(objectName);
  _exit(status) ;
}

you call the following in your main program:

  signal(SIGINT,  Exit) ;
  signal(SIGTERM, Exit) ;

Ben Keeping
Imperial College